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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Fang Xianfu
GURU


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

PostPosted: Mon Aug 13, 2007 10:39 pm   

[1.34]That old %ansi bug
 
Remember that bug where the first %ansi on a line wasn't expanded? So this:


#show %ansi(red)test %ansi(blue)test

would give you

Quote:
%ansi(red)test test

Try the same thing in 1.34, but using #mxp instead of #show.

Why you'd want to use %ansi instead of <color> in this case is beyond me, but there you go.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Aug 14, 2007 1:58 am   
 
Make sure when using #MXP that you put the {} around the argument. I've seen that problem in several other posts on the board. Let me know if it still fails with the {}.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Aug 14, 2007 2:35 am   
 
The functions aren't expanded at all with braces round the argument:

#mxp {%ansi(red)test %ansi(blue)test}
gives
%ansi(red)test %ansi(blue)test

If you specify the mode, it works though:

#mxp 1 {%ansi(red)test %ansi(blue)test}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Aug 14, 2007 4:39 pm   
 
Ah Ha! Thanks for figuring that out Fang. That tells me exactly what the problem is :)
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Tue Aug 14, 2007 8:41 pm   
 
To me it seems that it's expanded no matter what is put before {}. Doesn't have to be one, like in the script I posted on the other forum, it expanded this

Code:
#MXP Room: {<send>runto @DB4</send> - %ansi( green, high)%zonename( %roomzone( @DB4)) %ansi( blue, hign)%roomname( @DB4)%ansi( grey)}


but not

Code:
#MXP {<send>runto @DB4</send> - %ansi( green, high)%zonename( %roomzone( @DB4)) %ansi( blue, hign)%roomname( @DB4)%ansi( grey)}
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Aug 15, 2007 3:06 am   
 
It isn't actually expanding properly. What 1.34 is doing is sending the entire argument to the command line, and the command line doesn't expand everything correctly. You should just wait until 2.0 is released which will fix it completely.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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