|
dolgan Beginner
Joined: 15 Jul 2002 Posts: 13
|
Posted: 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? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
dolgan Beginner
Joined: 15 Jul 2002 Posts: 13
|
Posted: Wed Aug 01, 2007 12:31 pm |
Thanks a bunch.
A little tweeking and it works like intended, many thanks. |
|
|
|
|
|