|
drifter Newbie
Joined: 10 Oct 2005 Posts: 2
|
Posted: Mon Oct 10, 2005 2:55 pm
having trouble with #if |
I can't seem to get this to work:
The trigger text is: ^%1 has been marched.
The reaction is supposed to be:
#if %1=@member1 {toff}
#if %1=@member2 {toff}
#if %1=@member3 {toff}
#if %1=@member4 {toff}
#if %1=@member5 {toff}
#if %1=@member6 {toff}
#if %1=@member7 {toff}
#if %1=@member8 {toff}
toff is an alias for:
#T- grouptank
#T- Rescue
#T+ Shihonage
@poke = OFF
@rescue = OFF
@shihonage = ON
I'm guessing that the problem is in the #if statement, but I can't see it. any replies would be appreciated.
Thanks |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Oct 10, 2005 5:00 pm |
I think the problem is in your trigger. You said your trigger is
which will only match the literal "%1".
I'm assuming you want to match a word at the the beginning of a line so try this.
If this not right, then please post your exact trigger. Also a matter of efficiency, if you run the same command for each member you can try the command
Code: |
#if %ismember(%1,@MemberList) { toff } |
where @MemberList is a list of all the members; to reduce the number of #if statements used.. |
|
_________________ Asati di tempari! |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Oct 10, 2005 10:03 pm |
2 Problems first you should be using (%w) or in the case where it could be more then 1 word (*) in place of the %1 in the pattern
Second the #IF should have proper quotes in it
#IF ("%1"=@member1) {toff} |
|
|
|
|
|