I just discovered the Send To Script option for triggers, etc. and I've been trying to make use of this feature. I cannot seem to get the inline script to work. I always get an error box saying immediate execution line in error.
I have searched the site (docs and forums) looking for help and examples of this feature. Most of it looks to be written in VBScript. I use PerlScript.
I have tried the following variations:
Above, run~ is my script alias, as opposed to /.
As far as I can tell, the trigger is setup correctly. I use the same !defined() test in a script file subroutine for another trigger that is not inline script, and that works. I even copied the inline script out of the trigger and pasted to the input window. It worked perfectly there. The script will not work for me as an inline script.
Screen captures of the trigger setup:
http://fr.1of10.net/nx01/inline_trigger_script_1.jpg
http://fr.1of10.net/nx01/inline_trigger_script_2.jpg
I have searched the site (docs and forums) looking for help and examples of this feature. Most of it looks to be written in VBScript. I use PerlScript.
I have tried the following variations:
run~if (!defined($world->getVariable("TestVar"))) { $world->send("Some \"quoted\" text."); }
if (!defined($world->getVariable("TestVar"))) { $world->send("Some \"quoted\" text."); }
run~if (!defined(getVariable("TestVar"))) { send("Some \"quoted\" text."); }
if (!defined(getVariable("TestVar"))) { send("Some \"quoted\" text."); }
Above, run~ is my script alias, as opposed to /.
As far as I can tell, the trigger is setup correctly. I use the same !defined() test in a script file subroutine for another trigger that is not inline script, and that works. I even copied the inline script out of the trigger and pasted to the input window. It worked perfectly there. The script will not work for me as an inline script.
Screen captures of the trigger setup:
http://fr.1of10.net/nx01/inline_trigger_script_1.jpg
http://fr.1of10.net/nx01/inline_trigger_script_2.jpg