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


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Apr 30, 2007 10:27 pm   

[1.30] // comments tricking the parser - unmatched braces
 
#TRIGGER {pattern} {// comment}

errors with 'unmatched braces'
It's fixed by putting the closing bracket on the following line, but CMUD is taking the closing } as part of the comment
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


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

PostPosted: Tue May 01, 2007 12:24 am   
 
That is because the // command marks everything until the end of the line as a comment. So, the } is part of the comment. This is how // works in all other languages. If you want to use //, then you need to use the multiline syntax and not the single line syntax. There is no way to fix this.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Tue May 01, 2007 12:28 am   
 
It was only because CMUD exports it in this format that I flagged it, so an export then reimport will fail
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


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

PostPosted: Tue May 01, 2007 1:56 am   
 
Ahh, well, that would be the bug then. I'll add the export bug to the bug list. However, this should only occur when your trigger is empty (except for the comment).

Edited: Actually, I can't reproduce this. Exporting it should produce XML which should import correctly. Exactly how are you exporting/importing it? Can you post the XML file that is produced?

Only the Reformat command should cause this problem. If you have:
Code:
#TRIGGER {test} {
// comment
}

in your scripts, then it should keep it like this unless you reformat.

Also, if you want this to be a valid comment, you need to put a space between the // and the comment, or else the parser might also get confused that this might be a specific module path specification.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Tue May 01, 2007 8:44 am   
 
Hmm, it was an export from a while ago. I'll try again from the clean 1.30 install I did yesterday and post again if it fails.
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
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