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
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: 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.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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.
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Thu May 17, 2012 3:36 pm   
 
Ah awesome, 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