|
Voltan Wanderer
Joined: 17 Dec 2000 Posts: 65 Location: USA
|
Posted: Fri Jul 12, 2002 6:44 pm
problem with trigger |
Can't figure out why this trigger is not populating the "havecontainer" variable.
trigger = {@containertypes}
action = #IF %ismember( %1, @containertypes and @containercheck=1) {
#VAR havecontainer %addItem( %1, @havecontainer)
}
@containertypes containes the right words for the trigger(i.e. jar|backpack) and @containercheck=1 is true. It fires off the word "jar" when I do an inventory but "jar" is not added to @havecontainer like it should be. Any ideas?
Thanks for any help |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jul 12, 2002 10:19 pm |
It's a problem of syntax. You are missing a clossing parenthesis, an opening one, and a set of outer ones. Also, you need to surround what you want to be stored into %1 with parenthesis.Your trigger should be:
trigger = ({@containertypes})
action = #IF (%ismember(%1, @containertypes) and (@containercheck = 1)) {#VAR havecontainer %additem(%1, @havecontainer)}
Also, since the pattern of the trigger looks for a match agaisnt any member of the @containertypes stringlist variable, you do not need to check if the matched item is a member of this variable because otherwise, the trigger wouldn't have fired in the first place. So, your trigger now becomes:
trigger = ({@containertypes})
action = #IF (@containercheck = 1) {#VAR havecontainer %additem(%1, @havecontainer)}
Kjata |
|
|
|
Voltan Wanderer
Joined: 17 Dec 2000 Posts: 65 Location: USA
|
Posted: Sat Jul 13, 2002 12:36 am |
Yep, that works perfectly. Thanks a lot for your help, much appreciated!
|
|
|
|
|
|
|
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
|
|