Perfect. Must have missed that they were pointers. It took me a
hell of a long time to patch the whole thing by hand. ;-)

        Now I can compile fine, but I get a core dump trying to read the
player files. It crashes on reading the first player file with this:

[EMAIL PROTECTED] src.olc2]$ ../bin/crash.sh ../bin/rom ../area/core.24975
Core was generated by `../bin/rom -p 9002 -r /home/mud/coding/area -w
coding'.
Program terminated with signal 11, Segmentation fault.
#0  0x080be769 in group_add (ch=0x4040647c, name=0x8123450 "", deduct=0
'\0')
    at skills.c:999
999         sn = skill_lookup(name);
#0  0x080be769 in group_add (ch=0x4040647c, name=0x8123450 "", deduct=0
'\0')
    at skills.c:999
#1  0x080be696 in gn_add (ch=0x4040647c, gn=135448576) at skills.c:970
#2  0x080be813 in group_add (ch=0x4040647c,
    name=0x21 <Address 0x21 out of bounds>, deduct=0 '\0') at
skills.c:1024
#3  0x080be696 in gn_add (ch=0x4040647c, gn=135448576) at skills.c:970
#4  0x080be813 in group_add (ch=0x4040647c,
    name=0x21 <Address 0x21 out of bounds>, deduct=0 '\0') at
skills.c:1024
#5  0x080be696 in gn_add (ch=0x4040647c, gn=135448576) at skills.c:970
#6  0x080be813 in group_add (ch=0x4040647c,
    name=0x21 <Address 0x21 out of bounds>, deduct=0 '\0') at
skills.c:1024
#7  0x080be696 in gn_add (ch=0x4040647c, gn=135448576) at skills.c:970
#8  0x080be813 in group_add (ch=0x4040647c,
    name=0x21 <Address 0x21 out of bounds>, deduct=0 '\0') at
skills.c:1024
#9  0x080be696 in gn_add (ch=0x4040647c, gn=135448576) at skills.c:970
#10 0x080be813 in group_add (ch=0x4040647c,
    name=0x21 <Address 0x21 out of bounds>, deduct=0 '\0') at
skills.c:1024
#11 0x080be696 in gn_add (ch=0x4040647c, gn=135448576) at skills.c:970

... <SNIPPED>


        Line 997, where it dies, is the call to skill_lookup().

/* use for processing a skill or group for addition  */
void group_add( CHAR_DATA *ch, const char *name, bool deduct)
{
    int sn,gn;

    if (IS_NPC(ch)) /* NPCs do not have skills */
        return;

    sn = skill_lookup(name);

    if (sn != -1)
    {
        if (ch->pcdata->learned[sn] == 0) /* i.e. not known */
        {
            ch->pcdata->learned[sn] = 1;
            if (deduct)
                ch->pcdata->points += skill_table[sn].rating[ch->class];
        }
        return;
    }

...

        I also get this line of output on the console:

Thu Oct 24 09:23:00 2002 :: [*****] BUG: Cmd_func_lookup : funcion
inexistente.

        It doesn't say which function... is this a code problem, or a
problem with the data files? Has anyone seen this before?

        Thanks,

        Ryan


-- 
[EMAIL PROTECTED]
HELO... my name is root... you have SIGKILLed my father... prepare to vi!

     Hi! Can you to speak to me the learn for to speak the Unix?

On Thu, 24 Oct 2002, Tiikuli wrote:

> >>    The compiler seems to be choking on the reference to
> >> ch->pcdata->learned[sn], since in merc.h it is defined as:
> >>
> >> #if defined(FIRST_BOOT)
> >>     sh_int              learned         [MAX_SKILL];
> >>     bool                group_known     [MAX_GROUP];
> >> #else
> >>     sh_int              learned;
> >>     bool                group_known;
> >> #endif
>
> it should be:
> ...
> #else
>       sh_int          * learned;
>       bool            * group_known;
> #endif
>
>
>
>



Reply via email to