|
TorqueScript Reference
|
Functions | |
| void | Assert (condition, message) |
| void | cls () |
| String | collapseEscape (text) |
| void | dumpConsoleClasses (bool dumpScript=true, bool dumpEngine=true) |
| void | dumpConsoleFunctions (bool dumpScript=true, bool dumpEngine=true) |
| void | echo (text, [...] *) |
| void | echoSeparator () |
| void | error (text, [...] *) |
| String | expandEscape (text) |
| void | gotoWebPage (address) |
| void | quit () |
| void | quitWithErrorMessage (msg string) |
| void | sbmDumpStats () |
| void | sbmDumpStrings () |
| void | setEchoFileLoads (enable) |
| void | setLogMode (mode) |
| void | warn (text, [...] *) |
| void Assert | ( | condition | , |
| message | |||
| ) |
Fatal Script Assertion
| condition | if false, exit the program |
| message | message to print on assertion |
| void cls | ( | ) |
Use the cls function to clear the console output.
| String collapseEscape | ( | text | ) |
Use the collapseEscape function to replace all escape sequences ('xx') with a collapsed version ('xx').
| text | A string, possibly containing escape sequences. |
| void dumpConsoleClasses | ( | bool | dumpScript = true, |
| bool | dumpEngine = true |
||
| ) |
dumps all declared console classes to the console. This will dump all classes and methods that were registered from within the engine, AND from the console via scripts.
| dumpScript | Specifies whether or not classes defined in script should be dumped. |
| dumpEngine | Specifies whether or not classes defined in the engine should be dumped. |
| void dumpConsoleFunctions | ( | bool | dumpScript = true, |
| bool | dumpEngine = true |
||
| ) |
Dumps all declared console functions to the console. This will dump all funtions that were registered from within the engine, AND from the console via scripts.
| dumpScript | Specifies whether or not functions defined in script should be dumped. |
| dumpEngine | Specifies whether or not functions defined in the engine should be dumped. |
| void echo | ( | text | , |
| [...] * | |||
| ) |
| void echoSeparator | ( | ) |
Prints a separator to the console.
| void error | ( | text | , |
| [...] * | |||
| ) |
| String expandEscape | ( | text | ) |
Use the collapseEscape function to replace all escape sequences ('xx') with an expanded version ('xx').
| text | A string, possibly containing escape sequences. |
| void gotoWebPage | ( | address | ) |
Open a URL in the user's favorite web browser.
| void quit | ( | ) |
Use the quit function to stop the engine and quit to the command line.
| void quitWithErrorMessage | ( | msg | string | ) |
| Error | Message |
| void sbmDumpStats | ( | ) |
| void sbmDumpStrings | ( | ) |
| void setEchoFileLoads | ( | enable | ) |
Use the setEchoFileLoads function to enable/disable echoing of file loads (to console). This does not completely disable message, but rather adds additional methods when echoing is set to true. File loads will always echo a compile statement if compiling is required, and an exec statement at all times
| enable | A boolean value. If this value is true, extra information will be dumped to the console when files are loaded. |
| void setLogMode | ( | mode | ) |
Use the setLogMode function to set the logging level based on bits that are set in the mode argument. This is a general debug method and should be used in all but release cases and perhaps even then.
| mode | A bitmask enabling various types of logging. See 'Logging Modes' table below. |