Possible Bug with Script Prefix in Accelerator?

Posted by Hinotori on Thu 06 Sep 2007 12:46 PM — 3 posts, 13,188 views.

#0
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?
Australia Forum Administrator #1
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()")
#2
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.