|
Toihva Novice
Joined: 20 Nov 2004 Posts: 38
|
Posted: Wed Jul 19, 2006 1:50 pm
[1.03] #Alarm problems |
Ok, I use #alarm alot for resetting some variables.
Here is what I am having trouble with:
Code: |
#alarm "herbtimer" +3 {#var balherb {1}} |
Any thoughts on how to fix it so it works? |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Wed Jul 19, 2006 3:07 pm |
Why the brackets around the 1?
|
|
|
|
Toihva Novice
Joined: 20 Nov 2004 Posts: 38
|
Posted: Wed Jul 19, 2006 3:42 pm |
not sure, works this way so why change it, unless I need to for CMUD
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jul 19, 2006 4:54 pm |
With the {} around the 1, CMUD will treat @balherb as a string variable instead of a numeric variable. So that might have some unintended consequences.
When you say you are "having trouble" with it, can you be more specific on exactly what isn't working? Is it giving a syntax error? or is it doing something else wrong? Please be as specific as possible with bug reports. |
|
|
|
Toihva Novice
Joined: 20 Nov 2004 Posts: 38
|
Posted: Wed Jul 19, 2006 5:56 pm |
Its giving me "Error Compiling Script" and Command List Expected.
here is the entire alias
Code: |
#if (@balherb AND NOT @anorexia AND NOT @stun AND NOT @aeoned AND NOT @sleeping AND NOT @transfix) {#alarm "herbtimer" +3 {#var balherb {1}};balherb = 0;outr orphine;eat orphine} |
I can get the opening of it to be compiled but when it comes to the #alarm and adding options to it it starts the error part.
Zugg,
For the variable will I change the {1} to "1" or just 1? |
|
|
|
moonwlf Novice
Joined: 14 May 2001 Posts: 33 Location: USA
|
Posted: Wed Jul 19, 2006 11:08 pm |
I believe quotes would still make it appear as a string. For integer or boolan variables you should not have to have to put the value in any type of quote.
As to why the alias isn't compiling that could be the reason since it is looking for a string. If you look at your if conditional test it is testing for a boolan value but it is set as a string by the alarm.
|
|
|
|
|
|