trigger send lua script

Posted by Lxhd on Tue 11 Aug 2015 01:06 PM — 5 posts, 19,990 views.

#0
I made a trigger as following
trigger:^( |>)*asdfjlasdfll.*
send:
AppendToNotepad("text_window","%0"..os.date("%c").."\n");
send: Sctript

the trigger is working but show the following error,

Compile error
World: xlqy
Immediate execution
[string "Trigger: mizong"]:1: unfinished string near '"<triggers>'

please help me how to correct the lua script.Thanks.
Australia Forum Administrator #1
Please post the full thing:

Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
#2
<trigger
enabled="y"
group="normal"
make_underline="y"
match="^( |&gt;)*【密宝遗踪】玄武神帝:.*"
name="mizong"
regexp="y"
send_to="12"
sequence="100"
>
<send>AppendToNotepad("mizong","%0"..os.date().."\n");</send>
</trigger>

The trigger works well, but the script doesn't run, show the error message.
Amended on Thu 13 Aug 2015 10:40 AM by Lxhd
Australia Forum Administrator #3
In the "send to script" box a \n is turned into a newline, before it even reaches Lua.

To have it reach Lua double it like this: \\n
#4
Thanks a lot