Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jul 21, 2008 8:24 pm   

Should CMUD allow recursive triggers?
 
There have been a couple posts about problems caused by Prompt triggers that re-test themselves if you modify the prompt from within the trigger.

The "Trigger on Trigger" option controls whether or not other triggers are allowed to fire while processing a trigger. However, should a trigger *ever* cause itself to fire recursively? (except when the Reparse option is specifically given).

I can't really see any situation where a single recursive trigger would be useful, and I can see lots of areas where this trigger loop can actually cause problems. But let me know what you think, especially if you currently depend upon any recursive triggers in your scripts.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Jul 21, 2008 8:29 pm   
 
I don't think they should be allowed if reparse isn't specifically checked. Advanced scripters will be aware of this and will know how to handle it properly, and new scripters can very easily get into trouble.
_________________
Asati di tempari!
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Jul 21, 2008 10:20 pm   
 
As one of the individuals that had an issue with this, I'll add my opinion that it shouldn't re-test.

Anytime someone has a prompt in which they use a #SAYP or #SHOWP it is going to rematch on their prompt and cause an infinite loop unless they remembered to un-check that box.

It seems like anyone who intends for a re-parse to happen should be experienced enough to setup the trigger so that it does so with the existing mechanisms in place.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jul 21, 2008 10:30 pm   
 
Heh, nevermind...

Turns out that this was actually a bug. I already had code in CMUD to try and prevent Prompt triggers from triggering on themselves. But this code was getting overridden elsewhere in CMUD so it wasn't working. So it looks like I never intended Prompt triggers to trigger on themselves. Sorry for the confusion.

In v2.33, Prompt triggers should not trigger on themselves ever. You'll have to test this for me (and also test Reparse trigger states) to let me know if it works properly in the new version once I release it.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Jul 21, 2008 10:45 pm   
 
Excellent, can't wait to try it.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net