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
chewbacon
Beginner


Joined: 02 Oct 2004
Posts: 20
Location: Florida

PostPosted: Sat Oct 01, 2005 10:29 pm   

Button If-statements and ansi issue
 
I'm using this in a button caption:

Code:
%if(@status == 1, %btncol(WAP,0,3),%btncol(WAP,0,7) )>


It's intended to change button WAP's color to red if @status is 1, and if it's anything else the button will turn grey. However, the results are unsatisfactory and inconsistent. Every time, I'll see the foreground number appear on the button: "3>" and "7>". About 1/3 times, the color will change but the number remains. Any ideas?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Oct 01, 2005 11:29 pm   
 
I have never had problems with inconsistencies in button captions and button control functions. In order to hide the numbers you have to eat the results. I commonly use another %if.
Code:
%if(%if(@status=1,%btncol(WAP,0,3),%btncol(WAP,0,7)),,)>

_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
chewbacon
Beginner


Joined: 02 Oct 2004
Posts: 20
Location: Florida

PostPosted: Sun Oct 02, 2005 3:02 am   
 
that worked. thanks! :)
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