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


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sat Nov 11, 2006 3:52 pm   

[1.14] #SUB compile problems
 
#SUB compile / parser problems (Edit: I've just checked and this problem was also in 1.13):

(a) I can't seem to call user-defined functions from a #SUB:
#SUB {You fled @HighlightDir(%1).}
Error compiling script:
unmatched parenthesis

The same thing compiles in an #ECHO:
#ECHO {You fled @HighlightDir(%1).}

---------------------------------------------

(b) Similar #SUB problem with parentheses:
#SUB {The original text. %ansi(brown)(word, a description of the place, two words ())}
Error compiling script:
unmatched parenthesis

The empty parentheses mean I have not assigned any flags to the object. I tried quoting the parentheses:
#SUB {The original text. %ansi(brown)(word, a description of the place, two words "()")}
also gives:
Error compiling script:
unmatched parenthesis

Taking out the empty parentheses fixes it:
#SUB {The original text. %ansi(brown)(word, a description of the place, two words)}

This variation gives:
#SUB {The original text. %ansi(brown)(word, a description of the place, two words) "()"}
Error compiling script:
unmatched braces

---------------------------------------------

(c) Compatibility report error with #SUB:
The script:
#SUB {" here"%1", RIDING a "}
compiles (and works), but the compatibility report says:
%1 within quotes is not expanded

However, as you can see, the %1 is not in quotes - it is the rest of the text that is in quotes.
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Nov 11, 2006 5:56 pm   
 
I've added the #SUB issues to the bug list.

The (c) problem with the compatibility report can't really be fixed unfortunately. The Compatibility report isn't doing a full syntax parse...it's just doing some simple regular expression string matches to flag possible issues.
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