Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
manbat
Novice


Joined: 21 Mar 2009
Posts: 35

PostPosted: 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
}
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: 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
Reply with quote
manbat
Novice


Joined: 21 Mar 2009
Posts: 35

PostPosted: Sat Mar 21, 2009 7:43 pm   
 
Sorry to clarify, I have this code in an alias, which is in the status window.
Reply with quote
manbat
Novice


Joined: 21 Mar 2009
Posts: 35

PostPosted: 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.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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), ...
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net