|
Jaiven Wanderer
Joined: 03 Oct 2007 Posts: 66
|
Posted: Sat Nov 03, 2012 11:24 pm
Pulling a specific word from an Array |
Hello, I am looking to set up a trigger that checks an array and does something if it hits true on a word from that array.
Example:
^ ~[ (%d) ~] ~< scraps ~> a cut of (%w)
Then I would have the value check %w in an array and if the %w matches a word it will do something. I just don't know how to make %w check the array for a specific word within it.
Thank you if you can help me out on this! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sun Nov 04, 2012 12:41 am |
in your example it would be something like
#IF (%ismember(%2, @array)) {do something}
alternatively, you could put the array into the trigger pattern:
^ ~[ (%d) ~] ~< scraps ~> a cut of ({@array}) |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|