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
Xiija
Beginner


Joined: 24 Apr 2018
Posts: 14

PostPosted: Thu Jan 15, 2026 2:28 am   

%ismember not working
 
Code:
#VAR mindstates ("Focused Mind"|"STR"|"Matter Over Mind"|"CON"|"Nimble Pondering"|"DEX"|"Reflexive Thoughts"|"AGI"|"Cerebrum Processing"|"INT"|"Dedicated Visions"|"WIS"|"Charismatic Wonders"|"CHA"|"Lucky Discovery"|"LUCK"|"Muddled Thoughts"|"RAND")

#VAR test "Matter Over Mind"
#VAR idx %ismember( test, mindstates)
#SAY Var: @test - idx: @idx


idx keeps showing 0
thanks for any help
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4794
Location: Pensacola, FL, USA

PostPosted: Thu Jan 15, 2026 1:42 pm   
 
you need to include the @ symbol to reference your variables inside the function:

%ismember(@test, @mindstates)
_________________
Discord server
Reply with quote
Xiija
Beginner


Joined: 24 Apr 2018
Posts: 14

PostPosted: Thu Jan 15, 2026 4:21 pm   
 
@shalimar
sry, it was brackets, not braces in the list .. zmud script area font is so small i cannot see which is which..
any way to change that?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4794
Location: Pensacola, FL, USA

PostPosted: Thu Jan 15, 2026 7:26 pm   
 
there is an option for that in preferences
_________________
Discord server
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