|
jtviper456 Novice
Joined: 17 Jan 2003 Posts: 37
|
Posted: Wed May 26, 2004 6:22 am
#ALARM creates triggers |
I'm using some #ALARM to execute some commands, I run into the following problem:
#IF {@channel=1 & @fruit=1} {#ALARM +45 {kus}
#ALARM +60 {planthq}}
---
When the one alarm sets off, it creates a trigger:
Pattern: +45
Value: kus
The second alarm goes off:
Pattern: +60
Calue: planthq
---
Is there something I'm doing wrong, or possibly a program error? |
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Wed May 26, 2004 7:08 am |
That's what alarms do. They create a trigger, fire once (unless set otherwise) and delete themselves. There's nothing wrong with what you've written unless you're expecting something else to happen.
|
|
|
|
jtviper456 Novice
Joined: 17 Jan 2003 Posts: 37
|
Posted: Thu May 27, 2004 3:07 am |
I tried this again, and it did the exact same thing, it never deleted the triggers it created from the #ALARM, there was over 20 +45s and +60s in the .mud file. If this helps any, in the aliases(kus and planthq), I have them set to loop over if {@channel=1 & @fruit=1}.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu May 27, 2004 4:23 am |
Without seeing the aliases, there's no way to tell what the problem is. The scripts of the aliases are included in the scripts of the alarms and the alarms won't delete themselves until they've completed their entire script, including the scripts the aliases they call.
One-time alarms are designed not to overwrite other one-time alarms with the same pattern (delay). There are many instances where it's desirable to have multiple one-time alarms with the same delay, especially if the alarms do different things. |
|
|
|
jtviper456 Novice
Joined: 17 Jan 2003 Posts: 37
|
Posted: Thu May 27, 2004 5:03 am |
Ok. So, if the alarm isn't executed, it won't delete itself. Thanks.
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Thu May 27, 2004 7:05 am |
Actually you CAN overwrite an alarm but you have to Name it #ALARM "NAME" {time pattern} {Value}
#IF {@channel=1 & @fruit=1} {#ALARM "kusalarm" {+45} {kus}
#ALARM "planthqalarm" {+60} {planthq}}
EDIT: Note that it is usually a good idea to name your #ALARM and #TEMP triggers to keep the exact problem you are having from happening :P |
|
|
|
|
|