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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Kaputchnik
Beginner


Joined: 06 Jan 2002
Posts: 28
Location: Sweden

PostPosted: Sat Mar 02, 2002 12:47 am   

Speed Menu - Code problem
 
Got a speed list from which you can add/remove the selected word from different lists, a word cannot be member of multiple lists so I've done the following code:


#va ok_to_add 0
#if %ismember( %selword, @allies) {
#echo Cannot be member of Multiple lists
#va ok_to_add 0
} {#va ok_to_add 1}
#if %ismember( %selword, @sig) {
#echo Cannot be member of Multiple lists
#va ok_to_add 0
} {#va ok_to_add 1}
#if %ismember( %selword, @race) {
#echo Cannot be member of Multiple lists
#va ok_to_add 0
} {#va ok_to_add 1}
#if %ismember( %selword, @guild) {
#echo Cannot be member of Multiple lists
#va ok_to_add 0
} {#va ok_to_add 1}
#if (ok_to_add = 1) {#IF %ismember( %selword, @enemies) {#echo %selword is already a member of the Enemy list} {
#additem enemies %selword
#echo %selword has been added to the Enemy list
}} {#echo BUG}


Problem: Somehow it ends with BUG, that is ok_to_add does not equal 1, which seems strange considering I've checked manually that it is not a member of the other lsits(Should be seen by a message anyway). I've got the latest beta, but I posted my issue here since I don't think it got something to do with the beta. Hope anyone can help.

Cheers,
Kaputchnik
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Sat Mar 02, 2002 2:13 am   
 
Yep, it isn't a beta issue. Simple typo.

You have:
#if (ok_to_add = 1) {#IF %ismember( %selword
Should read:
#if (@ok_to_add = 1) {#IF %ismember( %selword
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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