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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Virus
Wanderer


Joined: 29 Jun 2002
Posts: 69
Location: USA

PostPosted: Fri Feb 14, 2003 9:35 pm   

Stumped on how to do this....
 
I need a way to put the following code into the 'value' section on a guage:

%if(a < 0 and b < 0,$c plus a plus b)
%if(a < 0 and b >= 0,$c plus a)
%if(a >= 0 and b < 0,$c plus b)

Any suggestions on how to make all three of thos situations act as 1?

Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Feb 14, 2003 10:11 pm   
 
%if(a < 0 and b < 0,$c plus a plus b,%if(a < 0,$c plus a,$c plus b))
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Feb 15, 2003 1:57 am   
 
Did you really want the string "plus"? Or do you want the operation "+" (the latter makes more sense in a gauge)?

Since both (a < 0) and (b < 0) evaluate to false, you could just use
$c

However, I'm guessing you actually meant to use "+", with variables, and have changed your variable character to $.
%eval($c %if( $a < 0, + $a)%if( $b < 0, + $b))

LightBulb
Advanced Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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