hard coded vnums

Posted by GenmaC on Sun 10 Feb 2002 11:41 PM — 7 posts, 29,213 views.

#0
I know there was a list somewhere, but have misplaced it...I just need a pointer to it, thanks.
Australia Forum Administrator #1
It is in the FAQ - The server won't start up
Amended on Mon 11 Feb 2002 01:16 AM by Nick Gammon
#2
There are also a couple of vnum hard coded in a .c file ...

took me a while to get that cleared up
(bad coding on the smaug coders part)
#3
If you could give me a list of those (and maybe what you did to fix them), I'd be happy indeed.
#4
act_wiz.c around line 5071

     /* Added by Brittany, on Nov. 24, 1996. The object is the adventurer's
          guide to the realms of despair, part of academy.are. */
     {
       OBJ_INDEX_DATA *obj_ind = get_obj_index( 10333 );
       if ( obj_ind != NULL )
       {
         obj = create_object( obj_ind, 1 );
         obj_to_char( obj, victim );
       }
     }


and Near line 5084


/* Added the burlap sack to the newbieset.  The sack is part of sgate.are
   called Spectral Gate.  Brittany */

     {

       OBJ_INDEX_DATA *obj_ind = get_obj_index( 123 );
       if ( obj_ind != NULL )
       {
         obj = create_object( obj_ind, 1 );
         obj_to_char( obj, victim );
       }
     }


those are the only 2 that I remember of right now just define those items in mud.h and fix the code, all should be good then.

EDIT
Also check comm.c near line 2110 for a reference to 10333
Amended on Mon 11 Feb 2002 06:40 PM by Viruz
#5
oh and what i did to fix them in mud.h near all the other well known vnums

#define OBJ_VNUM_SCHOOL_GUIDE  18 //can be whatever num you want
#define OBJ_VNUM_SCHOOL_SACK   19 //whatever number you want

and in actwiz I just replaced the 2 lines to read from 
OBJ_INDEX_DATA *obj_ind = get_obj_index( 10333 );
to
OBJ_INDEX_DATA *obj_ind = get_obj_index( OBJ_VNUM_SCHOOL_GUIDE );

and
OBJ_INDEX_DATA *obj_ind = get_obj_index( 123 );
to
OBJ_INDEX_DATA *obj_ind = get_obj_index( OBJ_VNUM_SCHOOL_SACK );


#6
Thanks a ton.