Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Tue Jun 09, 2009 12:41 am   

What is wrong with this #switch statement?
 
Code:
#SWITCH (%iskey(@afflictions, anorexia)) {#3 cure anorexia}
 (%iskey(@afflictions, indifference)) {#3 cure indifference}


The first line compiles, as soon as I add the second, it will not, and ctrl+k reports
illegal token (%iskey(@afflictions, indifference)) {#3 cure indifference} at row 4 column 2
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Tue Jun 09, 2009 12:58 am   
 
Oh, hrm. I thought #nn syntax was fixed already, but its not, and that is the problem, so - cancel the above question.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Tue Jun 09, 2009 6:36 am   
 
What version are you on? This works fine in 2.37 and no syntax errors.

Output with anorexia is:

cure anorexia
cure anorexia
cure anorexia
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Tue Jun 09, 2009 2:42 pm   
 
The beta, 3.08.

I posted to this section because I originally didn't think it was a bug, and I happened to be in this section already anyway.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Jun 09, 2009 4:21 pm   
 
Caled wrote:
Oh, hrm. I thought #nn syntax was fixed already, but its not, and that is the problem, so - cancel the above question.


Uh, the #nn syntax is fixed, so it's not the problem. Let me see what I can do on my end here.

Charneus
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Jun 09, 2009 4:26 pm   
 
Interesting. The #nn syntax is fixed, as I previously stated, however, it doesn't seem to work in #SWITCH statements. I wound up having to change it to #LOOP 3 {cure anorexia} instead of #3 cure anorexia.

By the way, you really should do #nn syntaxes as #nn {action here}, not #nn action here. *shrug*

Charneus
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jun 09, 2009 4:30 pm   
 
There are still problems with the #nn syntax within statements like #IF and #SWITCH. This has been reported in the Beta Forum.

If you have problems with the beta version, you should only be posting to the BETA forum. If you post in this forum, people will be trying to reproduce your problem using the 2.37 public version, and they won't have any problem with it. So please keep beta posts in the beta forum, thanks.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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