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


Joined: 28 Sep 2006
Posts: 21

PostPosted: Fri Dec 15, 2006 8:37 am   

Does %regex expand @regexPattern?
 
Hello, I'm trying to do: userInRoom=%regex(@roomContents, @users)
Where roomContents = "something, something, something" and users="Sandra|Harry|Chooch|Whatever"

This does not work because @users is not being expanded?
Any other way to achieve the same thing? Also:
userInRoom=%regex(@roomContents, @users)
#IF (@userInRoom) {#SHOW BOO} {#SHOW BLAH}
Is there a way to do #IF (%regex(whatever..)) {} {}
Reply with quote
veek
Beginner


Joined: 28 Sep 2006
Posts: 21

PostPosted: Fri Dec 15, 2006 2:35 pm   
 
#TRIGGER matchRoom {.+?[(.+)]} {#COLOR Red; okayToWalk=1; #VAR roomContentsLst ""; #TEMP {Hp:.+} {#COLOR Yellow; #STATE matchRoom 0;} "" {regex|prompt}} "" {regex|disable}
#COND {} {#COLOR Green; #ADDITEM roomContentsLst %line} {LoopLines|Param=5}

Is there a way to disable this trigger at startup?

Also regarding the above post, i tried something like:
#FORALL @userInRoom {temp=%i; #IF (@temp =~ @roomContents) {skipRoom=1} {}}

And i'm getting a syntax erro at @
Why? Oh why? And this bombed as well:
#FORALL @userInRoom {#IF (%i =~ @roomContents) {skipRoom=1} {}}
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