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
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Fri Aug 08, 2008 4:14 am   

[2.35 Pro] Alarm thread seemingly can not create another alarm anymore.
 
Hey All,

After upgrading to 2.35 from I think 2.15, a alarm loop stopped working. It is fairly simple:
#ALIAS workdo {#SA Does work;#ALARM workalarm {+%random( 7, 23)} {workdo}}

Before this would keep going forever. Now it executes twice then stops. It seems that an alarm thread can no longer start up another alarm thread? I also tried using a #VAR and a local instead of the straight random proc call. This a bug, or as intended now?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Aug 08, 2008 7:46 pm   
 
This should do what you want, and will be much smoother and faster.
#ALIAS workdo {#SA Does work;#T+ workalarm}
#ALARM workalarm {*%random( 7, 23)} {workdo}}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Sat Aug 09, 2008 1:55 am   
 
Vijilante wrote:
This should do what you want, and will be much smoother and faster.
#ALIAS workdo {#SA Does work;#T+ workalarm}
#ALARM workalarm {*%random( 7, 23)} {workdo}}


I tried the above, but the delay is the same with each iteration. I believe that was true before and is why I did the + type ALARM. I also tried #SUSPEND on it and then restart, but this still results in the issue an ALARM can not seemingly create an ALARM.
Reply with quote
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Tue Aug 12, 2008 10:00 pm   
 
FYI, I tried a new alarm setup which seems to work fine for me.

#ALIAS workdo {#SA Does work;#ALARM workalarm1 {+6} {#ALARM workalarm2 {+%random(1,17)} {workdo}}}

So it seems an alarm can not redeclare itself to alter it's timeout, and also a * alarm can not have it's timeout period changed if it is a variable or a function based timeout.

I don't think that an alarm can not modify itself is documented in the help, but the second part that the timeout will not change is stated.
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Aug 12, 2008 10:34 pm   
 
You change the timeout of an alarm using the %alarm function, not by trying to use the #ALARM command again.
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