|
donkey_boy_1 Newbie
Joined: 06 Sep 2002 Posts: 4 Location: Australia
|
Posted: Thu Jul 17, 2003 2:49 am
bot variable trouble |
ok here is what i got
trigger
(%2) says 'j (%2)'
#if (%2=@spells) {c '%2' %1} {#abort}
variable
spells
{bless|armor|flurry|mortal restore|sanctuary|weed shield|regeneration|heal}
lil help plz it wont work |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Jul 17, 2003 3:45 am |
Glad you got it, because you didn't say what you want it to do. I will take a wild guess at what you want though.
#TR {(%w) says 'j ({@spells})'} {c '%2' %1} |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jul 17, 2003 3:52 am |
That's because you have %2 in your pattern twice. %2 really shouldn't be in the pattern at all, it's only intended for use in the value portion of the trigger. There are other wildcards intended for use in the pattern.
You've also mistakenly tried to compare a single value to a list of values as though they were numbers. This is guaranteed to produce undesired results. Instead, you need to check for membership in the list. Finally, you don't really need to use #ABORT. The default action for a false result is nothing.
#TR {(*) says 'j (*)'} {#IF (%ismember( "%2", @spells)) {c '%2' %1}} |
|
|
|
donkey_boy_1 Newbie
Joined: 06 Sep 2002 Posts: 4 Location: Australia
|
Posted: Thu Jul 17, 2003 10:01 am |
thanks for the help it works great
|
|
|
|
|
|