|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: 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 |
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: 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 |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: 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 |
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: 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 |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: 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 |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: 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 |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
|
|
|