Re: [DG Scipts] Request for all information Heilpern on Tue, Jan 20, 1998 at 08:39:31AM -0600

From: Eric Green (thrytis@IMAXX.NET)
Date: 01/20/98


On Tue, Jan 20, 1998 at 08:39:31AM -0600, Mark A. Heilpern wrote:
> >Also, while looping could be implemented with the addition of a variable
> >to the command item structure, which would point back to the beginning of
> >a loop, and would function basically the same as an if-block, with the
> >exception that it would look ahead for the end of the block, set the
> >block's back-reference to the current marker, and upon reaching an "end"
> >with a back-reference, go back to the referenced marker.
>
> I'd thought about looping, but I have a fundamental problem with it.
> Builders. If I wanted to give them a simple way to lock up my mud,
> I'd let them write the real code for it. I've got a pretty decent C
> interpretter that could, from a programming point of view, blow the
> doors off what we've got in DG, but I don't believe it's safe unless
> builders are not (generally speaking) permitted to use it.

Loops were originally intended for the scripts, but i just never got
around to adding them in.  The way i was going to prevent loops from
locking up the mud was to keep a loop counter on each trigger.  A
trigger could only loop so many times before a delay would be inserted.
Another counter would keep track of the total number of loops done
since the trigger had started, and would kill the trigger if it exceeded
a certain level.  This would allow looping through fairly large lists
(such as every mob in the game) in a reasonable amount of time, but
prevent infinite loops and loops from lagging the game.

Eric


     +------------------------------------------------------------+
     | 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/15/00 PST