03 Jul, 2011, arholly wrote in the 1st comment:
Votes: 0
I've got a disturbing problem with my OLC. For every race, it is saving it as "elf". I set the race to "giant" (for example), asave changed, and it shows the area as saving. When I shutdown and come back up, I redit the same mob and the race is now "elf".

Thoughts, help?
03 Jul, 2011, arholly wrote in the 2nd comment:
Votes: 0
I guess a further point to this is if I go and check the actual .are file, it shows the mob as being a giant. So, it's showing something goofy in the display, but I don't have an idea of where to look for this.
03 Jul, 2011, triskaledia wrote in the 3rd comment:
Votes: 0
I would suggest checking your const.c file and check to make sure that your giant is actually set to be a giant. i.e.
"Giant", TRUE,
0, 0, 0,
A | H | M | V, A | B | C | D | E | F | G | H | I | J | K},

and also in olc_save.c you might want to make sure your fprintf (fp, "%s~\n", race_table[race].name); is working correctly.

Only other thing I can think of is to make sure your MAX_RACE in merc.h or whatever file you use is at the proper number and don't forget to count 0.
03 Jul, 2011, arholly wrote in the 4th comment:
Votes: 0
I haven't even modified my const.c file, so I know that it is correct. Also, it is saving them correctly, just not showing them correctly when I medit the mob.
fprintf( fp, "%s~\n",	race_table[race].name );

sprintf( buf, "Vnum:        [%5d] Sex:   [%s]   Race: [%s]\n\r",
pMob->sex == SEX_MALE ? "male " :
pMob->sex == SEX_FEMALE ? "female " :
pMob->sex == 3 ? "random " : "neutral",
race_table[pMob->race].name );
send_to_char( buf, ch );

<1000hp 1000m 1000mv> medit 1607

<1000hp 1000m 1000mv>
Name: [gruesome ogre]
Area: [ 44] Wyvern's Tower
Act: [npc sentinel scavenger aggressive stay_area]
Vnum: [ 1607] Sex: [neutral] Race: [elf]
Level: [10] Align: [-200] Hitroll: [ 0] Dam Type: [none]
Hit dice: [ 2d7 + 121] Damage dice: [ 2d4 + 2] Mana dice: [ 5d9 + 100]
Affected by: [none]
Armor: [pierce: 10 bash: 10 slash: 10 magic: 80]
Form: [edible humanoid mammal]
Parts: [head arms legs heart brains guts hands feet fingers ear eye]
Imm: [none]
Res: [fire cold]
Vuln: [lightning mental]
Off: [disarm dodge trip assist_vnum]
Size: [medium]
Material: [unknown]
Start pos. [sitting]
Default pos [standing]
Wealth: [ 60]
Short descr: a gruesome ogre
Long descr:
A huge, gruesome ogre is sprawled here, gnawing some strange meat.
It thinks that perhaps you would make a better meal.

And this is what it looks like in the area file.
gruesome ogre~
a gruesome ogre~
A huge, gruesome ogre is sprawled here, gnawing some strange meat.
It thinks that perhaps you would make a better meal.
ABCFG 0 -200 0
10 0 2d7+121 5d9+100 2d4+2 none
1 1 1 8
sit stand none 60
AMV ABCDEFGHIJK medium unknown
04 Jul, 2011, arholly wrote in the 5th comment:
Votes: 0
OK, I figured out the problem. I put the following code in db.c to modify mob stats in create_mobile, but it is making the olc show it as whatever race I last entered. What am I doing wrong?
if (pMobIndex->race = race_lookup("dwarf"))
mob->perm_stat[STAT_CON] += 2;

if (pMobIndex->race = race_lookup("elf"))
mob->perm_stat[STAT_DEX] += 2;
04 Jul, 2011, Rarva.Riendf wrote in the 6th comment:
Votes: 0
pMobIndex->race = race_lookup("dwarf")

you mean == dont your compiler warn you about it ? If not put all the warning on, as a mud shoudl be able to compile without any of them as it does not do any fancy weird thing.
04 Jul, 2011, Runter wrote in the 7th comment:
Votes: 0
The answer is that in C you can place regular statements that may be evaluated in the if statements conditional parameter.
if (i = 10) ; // always true

if (i == 10) ; // depends on the value of i

So this creates some confusion, understandably, when assignment (=) operator is used by accident if an equality (==) operator is intended.
05 Jul, 2011, oenone wrote in the 8th comment:
Votes: 0
Yeah, and
if (i = 0) ; // always false