|
TesterOfLimitz Novice
Joined: 02 Jun 2007 Posts: 37
|
Posted: Fri Jun 15, 2007 6:07 am
Problem with Setting a variable inside an alarm |
So far, Ive run into this problem twice so far, and either im completely missing whats wrong, or there may be something wrong with the Syntax Checker. Ill give you one of the examples:
An alias called Autolight:
Syntax:
Code: |
#if (@syssettings.needlight and @syssettings.bal and @syssettings.equil and @syssettings.templight) {
syssettings.templight = 0
lightpipes
#alarm templight +.75 {syssettings.templight = 1}
} |
The problem is, the script wont compile, because it says there's an unmatched bracer in there somewhere, and places the cursor directty behind the {syssettings.templight
So I go back and check, and it seems all my bracers are in the right places. Any help?
P.S. Ive also gone back and tried using
Code: |
syssettings.templight=1 |
but it gives me the same compile error |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Jun 15, 2007 6:37 am |
CMUD is getting confused by the +.75. Not sure if I'd classify it as a bug since the documentation for #ALARM says you should have curly braces around the time.
Either on of these modifications will work.
Code: |
#alarm templight {+.75} {syssettings.templight = 1} |
Code: |
#alarm templight +0.75 {syssettings.templight = 1} |
|
|
_________________ Asati di tempari! |
|
|
|
TesterOfLimitz Novice
Joined: 02 Jun 2007 Posts: 37
|
Posted: Fri Jun 15, 2007 7:04 am |
Brilliant mate.......I noticed the brackets around the time in the help file and didnt even think to try them out (I cant ever remember having to before, sheer assumption on my part).
Anyways, thank you very much for the speedy help! |
|
|
|
|
|