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
➜ Possible Bug with Script Prefix in Accelerator?
Possible Bug with Script Prefix in Accelerator?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Hinotori
(5 posts) Bio
|
Date
| Thu 06 Sep 2007 12:46 PM (UTC) |
Message
| This isn't posted in the Bug Report forum because I'm not entirely sure it's a bug. However, when I change the scripting prefix to something else, I find I no longer can call scripts from Accelerator. For example, my script prefix is "\" .
function TestPlayOff()
Accelerator ("A", "say Off.")
Accelerator ("O", "\TestPlayOn()")
end
Instead of executing the script, the function is sent, minus the prefix, to the World rather than to Script. E.g. in the preceding example, "TestPlayOn()" is sent to the MUD. Any ideas what I'm doing wrong here? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 06 Sep 2007 10:54 PM (UTC) |
Message
|
Quote:
Accelerator ("O", "\TestPlayOn()")
In Lua, and various other languages, \T is an escape sequence representing the tab character. That is why it isn't going to scripting, and why you are seeing a space. To incorporate a backslash in a script, you need to double it:
Accelerator ("O", "\\TestPlayOn()")
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Hinotori
(5 posts) Bio
|
Date
| Reply #2 on Sat 08 Sep 2007 08:57 AM (UTC) |
Message
| Thanks for coming to my aid once again, Nick. I'm a little embarrassed I didn't debug it enough to figure it out, but all the more reason to be grateful for the help. | Top |
|
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.
9,975 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top