|
veek Beginner
Joined: 28 Sep 2006 Posts: 21
|
Posted: 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..)) {} {} |
|
|
|
veek Beginner
Joined: 28 Sep 2006 Posts: 21
|
Posted: 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} {}} |
|
|
|
|
|
|
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
|
|