 |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Sat Mar 21, 2009 7:32 pm
If greater/less than or equal to |
Does not work. Tried in both 3.05 and 2.37.
%if( 10 >= 0, blah, blah)
and
#IF ( 10 >= 0 ) {
BLAH
} |
|
|
 |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Sat Mar 21, 2009 7:40 pm |
It does work for me, btw.
|
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
 |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Sat Mar 21, 2009 7:43 pm |
Sorry to clarify, I have this code in an alias, which is in the status window.
|
|
|
 |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Sat Mar 21, 2009 7:48 pm |
%if(%2 & %2 >= 0, %if(( %2 > 6 ), %ansi( bright, cyan), %if(( %2 > 4 ), %ansi( yellow), %ansi( bright, red)))%1 %if(( %len(%eval(%2+1)) < 2 )," ")%ansi( gray)%eval(%2+1), %ansi( red)%1%ansi( gray)%eval("~-~-"))
That is the code that is trying to be used. With >= it wont work. With >= 1 it wont work. take away the = and it works. |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Mar 23, 2009 4:17 pm |
That code snippet seems to work fine for me, if I'm understanding what you are trying to do. What makes you think it doesn't work? How exactly are you trying to use this in the status window? Can we see the entire code instead of just a snippet?
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Mar 23, 2009 5:13 pm |
Remember that && is used for the AND operator in CMUD, not just & like in zMUD. It also helps to put () around the entire expression, such as:
%if((%2 && %2 >= 0), ... |
|
|
 |
|
|