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
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: 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?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Sun Apr 15, 2007 1:40 pm   
 
I'm not trusting reformat yet, it's breaking any of my longer scripts (anything with a few nested #IF, #SWITCH, #FORALL) at the moment
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=27052
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: 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
Reply with quote
Zugg
MASTER


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

PostPosted: 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.
Reply with quote
Zugg
MASTER


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

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


Joined: 14 Aug 2004
Posts: 1269

PostPosted: 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.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Apr 17, 2007 11:14 pm   
 
#show %ansi( red, blue)test%ansi( green, yellow)test

works fine for me.
_________________
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: 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.
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