 |
Crymson4 Novice
Joined: 20 Nov 2001 Posts: 35 Location: USA
|
Posted: Tue Nov 27, 2001 10:55 am
Interpreting a String literally? |
I made a trigger to do a pretty simple IF check.
%1 tells you 'Let me in!"
Then the action is.
#IF (%1=@P1) {Do true stuff} {Do false stuff}
Problem is, it's not doing EITHER. Even if %1 matches @P1 EXACTLY (The player name), it won't run the trigger, true or false. Is there something I need to do to tweak it to where it'll match up Strings (text) instead of numbers? (as I've had no problems with it matching numbers in the past)
Thanks.
-=Crymson
Reality is the effect of alcohol deficiency |
|
|
|
 |
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Tue Nov 27, 2001 11:12 am |
You need to put the %1 in the pattern between (), otherwise it won't be saved as a wildcard, and you can't call it with %1 in your value.
#TRIGGER {(%1) tells you 'Let me in!"} {#IF (%1=@P1) {Do true stuff} {Do false stuff}}
Better would be to replace that %1 in your pattern with a more specific wildcard like %w or %x, because the general rule is to only use %1, %2, etc in values, not in patterns.
Acaila |
|
|
|
 |
decantor Apprentice
Joined: 14 Nov 2001 Posts: 100
|
Posted: Tue Nov 27, 2001 1:36 pm |
You might also need to contain @P1 in quotes, though in some circumstances you wont need to.
#TRIGGER {(%w) tells you 'let me in!'} {#IF (%1 = "@P1") {true} {false} |
|
|
|
 |
Crymson4 Novice
Joined: 20 Nov 2001 Posts: 35 Location: USA
|
Posted: Tue Nov 27, 2001 7:08 pm |
I knew I had to change the wildcard, but I couldn't remember where, so I defaulted back to %1. Thanks for setting me straight all the way around.
-=Crymson
Reality is the effect of alcohol deficiency |
|
|
|
 |
|
|
|