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
chris123zugg
Adept


Joined: 23 Aug 2013
Posts: 218

PostPosted: Wed Apr 30, 2025 9:16 pm   

using match and a string list off a pattern match
 
Player: (*) is the capture
i then need it to match the capture to the string list and do or not do something... this according to the #help file should work?
Code:

#IF %match(%1, %ismember("%1", "@partytoons")) {} (edited)


any help would be appreciated, thanks in advance :P
Reply with quote
shalimar
GURU


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

PostPosted: Thu May 01, 2025 3:16 am   
 
ditch all the quote marks, you only need those when passing a string, you want these values to evaluate
also, you only need %ismember, %match essentially expects a trigger pattern, which you arent providing

%match(%1, "{@partytoons}")
%ismember(%1, @partytoons)

should both evaluate as true
_________________
Discord: Shalimarwildcat
Reply with quote
chris123zugg
Adept


Joined: 23 Aug 2013
Posts: 218

PostPosted: Fri May 02, 2025 12:33 pm   
 
SOrry this is the capture..

Party~:(*)
#IF %match(%1, %ismember("%1", "@partytoons")) {} (edited)
Reply with quote
shalimar
GURU


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

PostPosted: Fri May 02, 2025 12:38 pm   
 
That adds no new information.
You are overcomplicating things.

There is no need for you to use both %ismember and %match here.
One or the other will get the results you seek.

also, remember to wrap your expressions, and mind the wrapping characters you use, you are using parenthesis instead of curlies for your false commands

#IF (expression) {true commands} {false commands}
_________________
Discord: Shalimarwildcat
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