Re: [ Code ] Problems with characters dying...

From: Rasdan (rasdan@PEAK.ORG)
Date: 07/30/97


On Wed, 30 Jul 1997, David Klasinc wrote:

>  for ( scaning thru all the chars on the mud )
>
>  if (ch does something funny)
>    do_this(ch);

 Replace this:
>  if (ch does something else)
 With this:
   else if (ch does somethign else)
>    do_something_else(ch);
>
>  ... etc etc...
>
>
> Now the problems comes, because in do_this() ch can be killed... And when
> I check for something else, ch is already NULL and everything goes
> foobar... :/

Either that or recode death so that the char's link isn't dropped and the
char isn't freed when dead. Works better IMHO.

Rasdan


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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