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

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


From: "Mike Breuer" <mbreuer@NEW.RR.COM>
> 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;
>

Yeah, I did that yesterday and it worked, and for the life of me, I
couldnt not tell the difference. Reading the macro, it seems to be the
same as above
ie. #define GET_RACE(ch)  (IS_MOB(ch) ? ch->mob_specials.race :
ch->player_specials->saved.race)
and GET_RACE = value
would express it exactly as your if/else statements. I was trying to
work out the difference because when you read it out loud, it sounds the
same heheheheh

Bugger me, it means I havent read enough about pointers!!! I am on my
twenty millionth reading of pointers (this time, in a C++ book heh)

Thanks Mike and George. I understand it a wee bit better now, and
strange enough, the mud has lasted longer than 6 hours. How bizarre eh?

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