> Hey list,
>
> According to my changelog, I haven't done anything that should cause any
> crashes regarding new_char(). However, all of a sudden my poor little guy
> goes boom after it's booted up. Specifically, it's going bang trying to
set
> ch->max_hit = class_table[ch->class].hp_base... and the problem is of
course
> that ch->class is some odd number which it shouldn't be at all.
>
> My question is how does a totally new CHAR_DATA *obj get allocated
> incorrectly? I've checked to make sure it is really alloc_perm'ing *ch
and
> not using char_free. I must confess I'm not as up on my memory management
> as I probably should be, but the thing doesn't give me any problems with
the
> thousands of ch's being made at boot...
>
> Steve
First off, good name :) secondly: i would look first in nanny() and make
sure that you are assigning the class to a character correctly. if i
remember stock rom correctly it(character creation) passes values that are
used in making the new character... Now that i think about it your line of
code there looks nothing like stock, which looks like so:
<snipped>
ch->hit = 20;
ch->max_hit = 20;
ch->mana = 100;
ch->max_mana = 100;
ch->move = 100;
ch->max_move = 100;
<snipped>
Your problem comes in that if i understand what you are asking... you are
trying to assign in new_char the maxhit instead of nanny... and in new_char
you don't _have_ a ch->class yet... understand?