| Message |
The problem is a bit more subtle. :)
First, the variant you want is your second one, because "send to script" already knows you want to script it, and adding the script prefix is unnecessary, and in fact, wrong.
If you want to use the script prefix (why, I can't think) then you need to "send to execute" so it goes through the command parser, which then notices the script prefix.
However the idea of "send to script" was that triggers like that would continue to work even if you changed the script prefix.
The main problem is that triggers very helpfully translate backslash sequences for you, so that \" becomes simply ".
To make it work, which it did for me you need to escape the backslash, so it makes it through to the Perl engine. This works:
if (!defined($world->getVariable("TestVar")))
{ $world->send("Some \\"quoted\\" text."); }
Note the extra backslashes.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|