Other great resources: Official JS API docs, Scripting Forum
debug()
- Aubergine
Owned by Aubergine
Outputs text to the terminal or log file depending on operating system.
Syntax
try { debug(text); } catch(e) { console(e.message); // error occurred }
Parameters
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
text | String | The text to output to the command line. | 3.1 Beta 1 |
Return value
Value | Type | Description | Game version |
---|---|---|---|
undefined | Undefined | The text was successfully sent to the console / logs. | 3.1 Beta 1 |
<error> | Error | If something went wrong, eg. unable to write to the logs, an error will be thrown. | 3.1 Beta 1 |
Example
Send some text to the terminal
debug("Greetings Commander!");
Notes
As of Warzone 3.1 RC3 (and earlier) the output will go to different places depending on operating system:
Operating System | Output location | |
---|---|---|
Microsoft Windows | Windows Debugger Duha's Debug Reader provides an easier way to see the output. | |
Apple OS X | System console (also known as "System Messages") View using Console.app. | |
Linux | Linux console |
There are some plans to update the debug() function so that it always outputs to the Warzone log file regardless of operating system.
Messages sent using debug() can be put in to the Warzone log file by using the command line option:
warzone2100 --debug=script
This page not what you were looking for?
Maybe you meant Debug Menu instead?
Maybe you meant Debug Menu instead?
Availability 3.1 B1+
Requires:
- Warzone 3.1 Beta 1 and above.
- Broken in Warzone 3.1 Beta 4
(fixed in beta 5).
Changes are likely in future release (see Notes).
Contents
Jump to:
See Also
Related API features:
- hackAssert() – throw an error and game assert if a value is falsey
- console() – send a message to the in-game console
- chat() – send a message using in-game chat
Add-on APIs: