world.TranslateDebug
Sends a debugging message to the localizing translator script
Prototype
long TranslateDebug(BSTR Message);
Description
This sends a message to the translator script loaded at MUSHclient startup (if any). For example, if you had en.lua in the "locale" directory, it would be sent to the script space for that file (if EN was your locale).
The intention here is for that script to do things like monitor its performance (eg. count the number of times a string is translated) and display such counts when requested.
The message is passed to a function named "Debug" in the translator script (if found).
The function might look like this:
function Debug (message)
if message == "display" then
-- display counts
elseif message == "reset" then
-- reset counts
end -- if
end -- function Debug
VBscript example
world.TranslateDebug "display"
Jscript example
world.TranslateDebug ("display");
PerlScript example
$world->TranslateDebug ("display");
Python example
world.TranslateDebug ("display")
Lua example
TranslateDebug ("general")
Lua notes
The Message argument is optional, and defaults an empty string.
Return value
0 = called script OK
1 = script file not loaded (eg. no xx.lua file)
2 = function named Debug was not found in the script
3 = runtime error calling the function Debug