 |
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Thu May 17, 2012 12:10 pm
MUD colourcodes. |
My MUD colours text using the following codes $HIR$ would turn it red, $HIB$ would turn it blue etc..
I have an alias that sends a tell when I 'find' someone on the game, I use colour codes to make it look nicer.
#alias tf {tell %1 $BOLD$[$HIB$%lower( @FindName)$BOLD$] $BLU$is in $HIR$@FindRegion $BLU$at $HIR$@FindArea$0$. $BLU$in the room$0$:$HIB$ @FindRoom$0$.$BLU$ I have $HIR$@Energy $BLU$EP remaining.}
However I am getting an error saying that BOLD is not recognized, I assume this is the fact that $ is picked up as a script function.
Also this alias is an exact copy from zMUD, so this issue lies with different cMUD features.
cheers. |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu May 17, 2012 3:16 pm |
That's because in Cmud, $ is used to indicate a local variable name. Precede each $ with ~ (i.e., use ~$) every time you don't want it interpreted as a local variable.
Zmud did not have local variables, which is why this is now a problem for you. |
|
|
 |
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Thu May 17, 2012 3:36 pm |
Ah awesome, thanks.
|
|
|
 |
|
|