Logging Immortal Gives

From: Brian Christopher Guilbault (guil9964@nova.gmi.edu)
Date: 12/24/95


Hey Guys-

I'm adding many immortal commands to my syslogs and mudlogs (for imp's 
eyes anyway) and have come across this seg fault that has me beating my 
head against the wall. Here is the code and the error from act.obj.c:

/* Snipped from about line 615 */

        perform_give(ch, vict, obj);
/* My code starts here */

        if(GET_LEVEL(ch) >= LVL_IMMORT){
            sprintf(buf, "(GIVE) %s gave %s to %s.",
              GET_NAME(ch), (read_object(r_num, REAL))->short_description,
                GET_NAME(vict));
            mudlog(buf, CMP, LVL_IMPL, TRUE);   /* Log the immortal give */
        }

/* Snip */

Okay, r_num is declared at the beginning of the function do_give() and I 
declared *obj_list up there with the rest of the external structs. So 
this is the error I get:

Sun Dec 24 19:08:05 :: SYSERR: trying to create obj with negative num!

I know the solution is easy, but I can't find it. If you can help me, I'd 
appreciate it. You can mail me personally so as not embarras me on the 
list :-)  The error occurs right after I type give <obj> <vict>. Thanks 
in advance.


				-Brian



This archive was generated by hypermail 2b30 : 12/07/00 PST