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
Valint
Wanderer


Joined: 12 Nov 2003
Posts: 70
Location: USA

PostPosted: Mon Jan 26, 2004 7:25 pm   

%match and list variables
 
This looks like I'm just not finding the right syntax instead of being a bug, so posting this here instead of the beta forum.

I'm trying to use %match for a trigger pattern involving a list variable, e.g.,
#VAR test {a|b|c}
#SHOW %match("a", "({@test})", I)

It seems that the problem is that the variable, being inside quotes, isn't being expanded, as #SHOW %match("a", "({a|b|c})", I) works perfectly.

I know I can go back to ("a" =~ "({@test})") but as the %match function is preferable, can anyone help me with the right syntax to make this work?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jan 26, 2004 7:47 pm   
 
If it doesn't work with double-quotes, perhaps you should try without them. I'm not a beta tester so I can't test this for myself, since %match isn't in a public version yet.
#SHOW %match( "a", ({@test}), I)

It might even be necessary to double-quote some parts and not others.
#SHOW %match( "a", "({"@test"})", I)

The problem is that you want @test expanded and double-quotes tell zMUD not to expand what's between them.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jan 27, 2004 1:20 am   
 
What you are stating constitutes a bug and should be reported on the beta forum.
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