|
aedron Beginner
Joined: 29 Nov 2008 Posts: 20
|
Posted: Sun Nov 30, 2008 2:42 pm
%pos |
I'm not sure what's wrong with my reflex but it's not setting the variables the way it should with %pos.
Here is what I have:
^(*)h, (*)m, (*)e, (*)p, (*)en, (*)w (*)<>-$
#var prompt %7 _nodef Healing
#if %pos( x, @prompt) {balance=1} {balance=0}
#if %pos( e, @prompt) {equilibrium=1} {equilibrium=0}
#if %pos( l, @prompt) {leftarmbalance=1} {leftarmbalance=0}
#if %pos( r, @prompt) {rightarmbalance=1} {rightarmbalance=0}
#if %pos( b, @prompt) {sixthsense=1} {sixthsense=0}
#if %pos( k, @prompt) {kafe=1} {kafe=0}
#if %pos( p, @prompt) {prone=1} {prone=0}
All the variables (balance, equ, left/rightarm balances, sixthsense, kafe, prone) are equal to 1, whether or not it's in the prompt variable. Anybody able to point me with what's wrong with this?? I'm completely stumped. Thanks. |
|
|
|
aedron Beginner
Joined: 29 Nov 2008 Posts: 20
|
Posted: Sun Nov 30, 2008 2:56 pm |
Gah, I solved the problem. When I specified the class to send the prompt variable to (Healing), I had a duplicate variable of prompt elsewhere, and it wasn't picking up the proper variable.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Nov 30, 2008 6:09 pm |
By the way, you should really use %d instead of * in this case. That trigger will match extremely slowly.
|
|
|
|
aedron Beginner
Joined: 29 Nov 2008 Posts: 20
|
Posted: Mon Dec 01, 2008 12:01 pm |
will %d still work for matching each number in the prompt correctly like (*)?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Dec 01, 2008 12:08 pm |
You still need to put brackets around it, but yes, %d matches numbers specifically, whereas * matches anything. Take a look at this help file.
|
|
|
|
|
|
|
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
|
|