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
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Oct 28, 2007 3:58 am   

[2.09] Parsing error with %if
 
I have this button that hasn't ever worked in CMud. At first I figured it was because of the old zMud cross window variable references it had. Then in recent versions I could believe it to be caused by the variables in the caption not being visible to the window that holds the button. Now it seems from testing that the problem is the first part of the button caption. To see the parsing error enter at the command line #SHOW %if(1,,)

Using %null between the commas makes it work, but since #SHOW %eval() does not throw an error I have to believe the use of %null should not be required.

Just as a side note I can actually take that portion out of the button in CMud, where as it was needed with zMud because of the cross window referencing not causing an update. A step forward, yay!
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sun Oct 28, 2007 4:01 am   
 
It's stranger that #show %eval(1,,) works, but %if doesn't. However, that %if syntax is pretty bizarre at first glance, so it might be better to make the %eval example fail than to make the %if example work.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Oct 28, 2007 4:12 am   
 
The %if example though is the valid syntax for %if. It takes 3 parameters with the third being optional. #SHOW %if(1,) does not throw an error and it shouldn't.

I think the problem is what it says in the reference for %if. There it list the first 2 parameters as optional, and the 3rd as required. Some how this seems to be totally backwards.

As long as I am playing around with function parsing errors. #SHOW %eval(",") should display the comma.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 29, 2007 9:48 pm   
 
Well, that's very interesting. The Reference is supposed to show that the 3rd parameter is optional. At least that's what is in the CMD.DB database where this information is stored. So there seems to be a problem with the Reference panel, as well as with the parser. I'll see what I can find.
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