Re: [BUG][Code] crashing every 6 hours

From: Mike Breuer (mbreuer@new.rr.com)
Date: 11/19/01


----- Original Message -----
From: "John" <witpens@OPTUSHOME.COM.AU>
To: <CIRCLE@post.queensu.ca>

> #define GET_RACE(ch)  (IS_MOB(ch) ? (ch)->mob_specials.race :
> (ch)->player_specials->saved.race)

-- snip --

> error C2106: '=' : left operand must be l-value
> where my code says:-
> case 51:
>    GET_RACE(vict) = value;
>     break;

Your definition of GET_RACE() is a conditional, and not an lvalue.  You
probably need to change:

GET_RACE(vict) = value;

to:

if (IS_MOB(vict))
  vict->mob_specials.race = value;
else
  vict->player_specials->saved.race = value;

As to why your MUD is crashing, if you are running in the debugger, try
looking back on the call stack to see where act is being called from.  Most
likely it's a mob SPECIAL making the call to act.  I was once having crashes
at 30 minute intervals (the intervals weren't actually predictable, but the
30 minute boundary was), that turned out to be a bug in the mayor proc.

Mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST