Re: problem with races

From: Daniel Koepke (
Date: 12/10/98

Christina Orr wrote:
> Ok.  I'm having a problem with races that I have not experienced
> before. I'm sure that its something really simple but I'm just not
> getting it.  When I boot up the mud and log on, as soon as I type
> the letter for the race it goes back to the title screen and asking
> me what name I want.  The log shows this error:
> SYSERR: no valid target to act()!
> which leads me to this code:
>  if (ch && ch->in_room != NOWHERE)
>     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 checked out the CON_QRACE code and that looks like this:
>  .
>  .
>  .
> I don't see any problem with it.  Can anybody point me in the right
> direction to look for this problem?

The code you included from CON_QRACE isn't the source of your
problem.  This, one--such as myself--can discern by noting that the
code doesn't even call act(), making it more than just a little
doubtful it's causing a problem.

I am as incapable of giving you an allheal for this as surely as I am
unable to fast dancing (read: it's impossible).  But, I can tell you
to do something that *might* help.

Change the log() line in act() to read,

  log("SYSERR: No valid target to act(%s).", orig);

I think 'orig' is the first argument passed to act(), but if I'm
wrong, just change the 'orig' above to match the name of the first
argument passed to act() -- which should be the format (i.e., what
to print).  When you recompile and run, the next time said syserr
occurs, you'll get a clue as to where the faulty act() call is.

Another method to catch this is to force a core dump right after
the log() call, and then do a backtrace on the stack.  If you know
how to do it, it's probably faster.

If you want thorough act() debugging information, you can change the
name of act() to Xact(), add the arguments, "char * File, int Line";
make the act() prototype in comm.h correspond, at the top of comm.h
add the macro,

  #define act(a,b,c,d,e,f) Xact(a,b,c,d,e,f,__FILE__,__LINE__)

and then change the log() line to read,

  log("SYSERR (%s:%d): No valid target to act().", File, Line);


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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