 |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sun Apr 15, 2007 3:26 am
[1.27] %ansi and reformat |
%ansi(white,blue) works.
%ansi( white, blue) does not work.
When you reformat a script it changes all of your %ansi(color,color) to %ansi( color, color) which will not work! I'm not sure what the problem is concerning this since a space before the colorname worked in Zmud. However, it doesn't in Cmud or am I doing something wrong? |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Apr 15, 2007 12:57 pm |
No, it's a known issue I think. There have been lots of threads about it anyway.
The fact that reformat is breaking them is a new issue, though. |
|
|
|
 |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
 |
charneus Wizard

Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Apr 15, 2007 3:01 pm |
I wonder if it's just a random thing.
I reformated my script, and it has %ansi( high, red), and it works. No trouble at all.
The only problem I have with reformat is indenting a command, then expecting an argument BEFORE the command. :\
Charneus |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Apr 17, 2007 6:03 pm |
The reformating is working correctly in this case. But yes, there is a known problem with spaces in the %ansi command in some cases. Should be fixed in the next version. This is because you are assuming that CMUD will parse your strings correctly. The correct syntax would be:
%ansi( "white", "blue")
when you leave out the " quotes, then CMUD has to determine whether or not the white space is part of your string value. Obviously %ansi should be stripping spaces from the beginning and end, but I just wanted to point out that technically you should have quotes around your string values. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Apr 17, 2007 7:54 pm |
OK, I'll need to see your exact script because I can't get the %ansi function to fail at all. In fact, the implementation of %ansi already strips any spaces in the arguments, so I don't see any way to make this fail.
|
|
|
|
 |
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Tue Apr 17, 2007 11:07 pm |
IIRC from the previous report of this (previous version), the first %ansi of this form in a given line works, but subsequent ones do not.
|
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Apr 17, 2007 11:14 pm |
#show %ansi( red, blue)test%ansi( green, yellow)test
works fine for me. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Apr 18, 2007 2:11 am |
As with Fang, I cannot reproduce this, so please give the *exact* command that is failing. The code for the %ansi function has no way of knowing if it's the first one on the line or not, so something else is going wrong here. My guess is that your command has some sort of syntax error that is preventing the second %ansi from compiling properly.
|
|
|
|
 |
|
|
|