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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
dolgan
Beginner


Joined: 15 Jul 2002
Posts: 13

PostPosted: Wed Aug 01, 2007 11:59 am   

Parsing in the status window
 
I am a total newbie and need help to get this to work.

This is the way my status bar item looks:

%if(@terra=down, Terra: %ansi(white)Down, Terra: %ansi(green)Up

What i want it to do is type out "Terra: up" with up in green if the @terra variable is set to up.
Or "Terra: down" with down in white if the variable is set to down.

all it do right now is typ "%if(@terra=down, Terra: %ansi(white)Down, Terra: %ansi(green)Up" in the status window. No parsing wat so ever, what am i doing wrong?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Aug 01, 2007 12:10 pm   
 
You need a closing bracket at the end to end the %if. You may also find it helps making the strings there explicit, like so:

%if(@terra="down", "Terra: %ansi(white)Down", "Terra: %ansi(green)Up")

This makes sure that CMUD is giving your values the right type.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
dolgan
Beginner


Joined: 15 Jul 2002
Posts: 13

PostPosted: Wed Aug 01, 2007 12:31 pm   
 
Thanks a bunch.
A little tweeking and it works like intended, many thanks.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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