|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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 {}.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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} |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Aug 14, 2007 4:39 pm |
Ah Ha! Thanks for figuring that out Fang. That tells me exactly what the problem is :)
|
|
|
|
DanteX Apprentice
Joined: 13 Aug 2007 Posts: 166
|
Posted: 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)} |
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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.
|
|
|
|
|
|