Re: perform_act inthedark

From: FourSpace (realm@styx.ph.msstate.edu)
Date: 08/10/95


On Fri, 11 Aug 1995, Herbert Kremser wrote:

> > I seem to be having a problem with perform_act in my 3.0blp8.  It seems
> > that when i call a TO_ROOM act, with null ch and vict_obj (obj, the
> > second pointer, is the only one used), and the room is dark (flagged 
> > or nighttime), perform_act barfs on the line where it hits the $p in the 
> > switch, and calls CHECK_NULL(obj, OBJS(obj, to)).
> 
> Thats an easy one.
> There MUST be a ch.
> NEVER use act without a ch.
> 
> What room do you think that action is send anyway?
> Exactly to ch->in_room   ;-)

> Use send_to_room or something similar if you don't want what act does.
>

Actually, the to variable is defined in the following way, in act():
 
    to = world[ch->in_room].people;
  else if (obj && obj->in_room != NOWHERE)
    to = world[obj->in_room].people;
  else {
    log("SYSERR: no valid target to act()!");
    return;
  }

I want to use act() instead of send because it already uses the 
PERS macro to determine whether each recepiant of the mssg can even
see the char/obj in question (obj in this case)., Ie
"A long sword falls out of the sky." as opposed to
"Something falls out of the sky."...

Fireball



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