[BUG][Code] crashing every 6 hours

From: John (witpens@optushome.com.au)
Date: 11/19/01


Sorry guys, I desperately need help again - I think I should stop coding
in the wee hours of the morning!

I am running W2K and patch19 - no other snippets. According to MSVC++6,
I keep crashing at void act() at the line
    if (!str || !*str)
and this happens every 6 hours. This is very strange since I have not
added any act callups so far. It has crashed at another spot twice:-
In affect_total : (this has been replaced by the previous max checks)
 GET_DEX(ch) = MAX(0, MIN(GET_DEX(ch), GET_RACEMAX(ch, STAT_DEX)));
  GET_INT(ch) = MAX(0, MIN(GET_INT(ch), GET_RACEMAX(ch, STAT_INT)));
  GET_WIS(ch) = MAX(0, MIN(GET_WIS(ch), GET_RACEMAX(ch, STAT_WIS)));
  GET_CON(ch) = MAX(0, MIN(GET_CON(ch), GET_RACEMAX(ch, STAT_CON)));
  GET_CHA(ch) = MAX(0, MIN(GET_CHA(ch), GET_RACEMAX(ch, STAT_CHA)));

I did add the following race code (my own) that appears to have some
problems that may or may not be related:- (in utils.h)
#define GET_RACE(ch)  (IS_MOB(ch) ? (ch)->mob_specials.race :
(ch)->player_specials->saved.race)
#define GET_RACEMAX(ch, i)  ((GET_LEVEL(ch) >= LVL_IMMORT) ? 25 : (i <
MAX_RACE) ? race_details[GET_RACE(ch)][i] : 18)

Now the strange thing is, my compiler gives me the compile error in
act.wizard (in perform_set):
error C2106: '=' : left operand must be l-value
where my code says:-
case 51:
   GET_RACE(vict) = value;
    break;

I am at wits end why GET_RACE = value wont compile. I am also at wits
end on why the mud keeps crashing at act() when I havent made any call
ups, although I suspect it could be something to do with the RACE
macros.

Any help would be greatly appreciated.

TOTALLY STUMPED
Thanks in advance.

--
   +---------------------------------------------------------------+
   | 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