functional trigger doesn't work in plugin

Posted by Mahony on Wed 29 Oct 2014 07:11 PM — 4 posts, 16,141 views.

#0
Hi
I have a simple two-trigger plugin that I made exporting the triggers from world file where it works fine. The only thing I changed was re-arranging the "keywords" in the trigger header (enable, group, match,...)
Here it is

<triggers>
  <trigger
   custom_colour="17"
   enabled="y"
   expand_variables="y"
   group="qcolor"
   ignore_case="y"
   keep_evaluating="y"
   match="@q_name"
   regexp="y"
   sequence="100"
   other_text_colour="saddlebrown"
   other_back_colour="yellow"
  >
  </trigger>

  <trigger
   enabled="y"
   group="qcolor"
   match="Seek (.*?) out somewhere in the vicinity\'$"
   regexp="y"
   send_to="9"
   sequence="100"
   variable="q_name"
  >
  <send>%1
  </send>
  </trigger>
</triggers>



The first triger works fine. It fills the variable q_name. But the second doesn't work. I removed the plugin and recreated the triggers back to world file and it works fain again. But not in the plugin. Where is the difference?

Thanks for explaining

Mahony

[EDIT] Layed out triggers more readably. - Nick Gammon
Amended on Wed 29 Oct 2014 07:46 PM by Nick Gammon
Australia Forum Administrator #1
What text are you matching on? Can you copy and paste that please? The order of the keywords does not matter.
Australia Forum Administrator #2
I should point out that plugins have their own set of variables, compared to the main world. You won't see any variables set in the GUI interface if the first trigger fires. It will be a plugin variable.
#3
Found it!
here is the mistake

  <send>%1
  </send>

there are some spaces between the %1 and </send>

fix is

  <send>%1</send>


crap :P