|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Fri Mar 23, 2007 8:03 pm
#ALARM causing CMUD to fail |
I want to execute an alias (processRoundtime) after one second so I make the following statement.
#ALARM {+1} {processRoundtime}
Now this normally works fine. However sometimes CMUD gets in a state where this causes it to cough up it's completely unreadable error report asking if I want to close application. Unfortunately I usually have to do this as I use this construction all the time.
What I a trying to do is to wait for roundtimes from Dragonrealms. So every second it eats from roundtime, checks if there's any left and waits again if so. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Mar 23, 2007 9:39 pm |
That's not the proper alarm to use if you want to check every second. Use * instead of +. The + tells CMud to delete the alarm once it fires.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Sat Mar 24, 2007 12:12 am |
Well, I do want the alarm to terminate at some point. Anyway, it works fine normally but sometimes CMUD gets into a state where doing this makes it blow up and I have found no way to change this so I have to close CMUD and start it up again. Something I have to do ever so often.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Mar 24, 2007 6:20 pm |
It's more likely to be the alias' script than it is to be the #alarm command unless you see this with other alarms with other commands. I haven't noticed any problems with alarms.
|
|
|
|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Sun Mar 25, 2007 2:09 pm |
The alias looks like this:
---
#ADD roundtime -1
#IF (@roundtime < 0) {
roundtime = 0
}
#IF (@roundtime == 0) {
#STEP
}
#IF (@roundtime > 0) {
#ALARM roundtime {+1} {processRoundtime}
}
---
Remember that normally this works fine. It's only when CMUD gets in some quirky mode it starts blowing up. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Mar 25, 2007 8:39 pm |
What other settings do you have that create settings? I am going to guess none. I am also going to guess that you have an undectected infinite loop somewhere that is eating into the script processing stack. The error just happens to show up during setting creation. Anything beyond that and I am pretty much out of guesses, because I can't really seem to find a way to make this fail.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Mon Mar 26, 2007 7:30 pm |
I must admit I have no idea why it happens when it does. All I know is that I can't tell. There is nothing in settings that suggests that something is wrong so CMUD is not helping me much seeing what is wrong. The error report I cannot figure out at all. It would be nice if CMUD could tell a little about what was wrong...
|
|
|
|
|
|