The following functions can be used to debug Warzone 2100 scripts. ; void dbgMsgOn(int player, bool on)
Depending on the value of on turns on/off debug output of dbg() and ASSERT() function which are listed below.
; void dbg(string debugMessage, int player)
Outputs debugMessage to the game console if debug output for player player was previously turned on with dbgMsgOn().
; void ASSERT(bool assertExpression, string assertMessage, int player)
If assertExpression evaluates to FALSE, then assertMessage is output to the game console. Must turn on debug output for player with dbgMsgOn() first. NOTE: In debug game builds failed assertion will cause game assertion..
; void debug(string debugText)
Writes debugText to the standard output (usually a log file).
; void printCallStack()
Outputs script call stack to the standard log file.
{{Scripting manual}} Category:Scripting manual ?
