Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ trigger send lua script
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Lxhd
(27 posts) Bio
|
| Date
| Tue 11 Aug 2015 01:06 PM (UTC) |
| Message
| 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. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,166 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 11 Aug 2015 07:41 PM (UTC) |
| Message
| Please post the full thing:
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Lxhd
(27 posts) Bio
|
| Date
| Reply #2 on Thu 13 Aug 2015 10:37 AM (UTC) Amended on Thu 13 Aug 2015 10:40 AM (UTC) by Lxhd
|
| Message
| <trigger
enabled="y"
group="normal"
make_underline="y"
match="^( |>)*【密宝遗踪】玄武神帝:.*"
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. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,166 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Thu 13 Aug 2015 08:03 PM (UTC) |
| Message
| 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 |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Lxhd
(27 posts) Bio
|
| Date
| Reply #4 on Fri 14 Aug 2015 12:41 PM (UTC) |
| Message
| |
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
18,014 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top