Outputs text to the terminal or log file depending on operating system. |
try { debug(text); } catch(e) { console(e.message); // error occurred } |
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
text | String | The text to output to the command line. | 3.1 Beta 1 |
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 |
debug("Greetings Commander!"); |
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? |
AvailabilityRequires:
Changes are likely in future release (see Notes). |
ContentsJump to: |
See AlsoRelated API features:
Add-on APIs: |