On Sun, 27 Jun 1999, Andrey Fidrya wrote: > The obvious solution is adding next_k variable > and doing next_k = k->next at the beginning of > cycle but it's not applicable here: Do not to extract things that die right off, simply move them to some special, unused room and then at the beginning of the next loop extract everything in that room. That way, you eliminate the problem by side-stepping the extracting of mobiles until well after you need them around. You could also maintain a global linked list of characters to extract. The general idea is the same. Or, you could try hacking up the for (;;) loop more to make it work, but there could be other situations where this same bug exists in your code. And, anyway, I can't think of anything remotely attractive and 100% fool-proof to replace it with. Anyway, you'd have to hack up all the for (;;) loops that may fall prey to this -- not worth the trouble, in my estimation. Ah, and as I see, you just did post a kludge to deal with it. Still quite ugly. ;) -dak +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST