Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.TranslateDebug


Name TranslateDebug
Type Method
Summary 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


Note: Available in version 4.12 onwards.


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.
Returns 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
Introduced in version 4.12

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.