[ Code ] Problems with characters dying...

From: David Klasinc (bigwhale@CAPYBARA.SK-PTTSC.LJ.EDUS.SI)
Date: 07/29/97


Banzai!

 Ok, this is the problem... I know how to solve it, but it's rather
clumsy and slows down the mud... :(

I'm doing somethign like this...

 for ( scaning thru all the chars on the mud )

 if (ch does something funny)
   do_this(ch);

 if (ch does something 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... :/

Ok, I could go through the character_list two times, but is there a way
w/o wasting the extra time?

Maybe to put the code in do_this() in the same function and then break out
if character dies? *pondeR*

Ideas? :)


David!


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