Re: [NEWBIE] Room depth/DG Scripts

From: Yohay Etsion (yohay_e@NETVISION.NET.IL)
Date: 11/03/98


Phillip A. Ames wrote:

> Hey all, I put in room depth, and was having a bit of a problem...
> When
> it starts resetting zones on bootup, it'll kill itself at zone 1(Where
>
> the mortals start, etc.).  It'll point me to this chunk in
> dg_triggers.c
>
> void load_otrigger(obj_data *obj)
> {
>   trig_data *t;
>
>   if (!SCRIPT_CHECK(obj, OTRIG_LOAD))
>     return;
>
>   for (t = TRIGGERS(SCRIPT(obj)); t; t = t->next) {
>     if (TRIGGER_CHECK(t, OTRIG_LOAD) &&
>         (number(1, 100) <= GET_TRIG_NARG(t))) {
>       script_driver(obj, t, OBJ_TRIGGER, TRIG_NEW);
>       break;
>     }
>   }
> }
>
> The line where it bombs out is the (number(1, 100) <=
> GET_TRIG_NARG(t))){
>
> line...  Anyone else had this problem before?  I went through and
> replaced all the ->in_room's with the IN_ROOM(xxx) macro.  Anyone know
>
> what might be wrong?
>
> -Phillip
>
> Phillip Ames    | Satisfaction is not guaranteed.
> kirk47@juno.com | -Ferengi Rule of Acquisition #19
> ICQ: 8778335    | AOL IM: Grathol
> http://members.xoom.com/Gowron/index.html(Unfinished)
>
> ___________________________________________________________________
> You don't need to buy Internet access to use free Internet e-mail.
> Get completely free e-mail from Juno at http://www.juno.com
> or call Juno at (800) 654-JUNO [654-5866]
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>      +------------------------------------------------------------

Hi ,

I patched the room_depth thingy a while ago so I'm not sure ,
but I remember that the problem was not in the IN_ROOM macro ,
but in the acctual place of the varibale. You see , the one who wrote
this code defined a new array (I don't remember its name) in which
the data about the room was placed and that screwed the while thing
up. I'll try to explain :
at first the room the char was in was stored in ch->in_room
but , the coder put another array in and then it was
ch->room_array->in_room.
He built this array so he could put the depth var into it so you'll have
a
ch->room_array->room_depth variable.
I fixed the while thing by copying the in_room and depth data into the
char_data
array so it is ch->in_room and ch->room_depth. That , as I recall ,
fixed the whole
thing ...

Yohay


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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