Difference between revisions of "TraceAndBox - Debug"
Jump to navigation
Jump to search
imported>Rhavlovick m (1 revision: Clobber re-import by Henning) |
imported>Thingy Person (→Syntax) |
||
Line 8: | Line 8: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Function TraceAndBox(string asTextToPrint, int aiSeverity = 0) global | Function TraceAndBox(string asTextToPrint, int aiSeverity = 0) global | ||
MessageBox(asTextToPrint) | |||
Trace(asTextToPrint, aiSeverity) | |||
EndFunction | |||
</source> | </source> | ||
Latest revision as of 18:34, 29 June 2013
Member of: Debug Script
Outputs a string to the Papyrus log on disk, the Papyrus debug text page, and pops up a message box with the same text.
Syntax[edit | edit source]
Function TraceAndBox(string asTextToPrint, int aiSeverity = 0) global
MessageBox(asTextToPrint)
Trace(asTextToPrint, aiSeverity)
EndFunction
Parameters[edit | edit source]
- asTextToPrint: The text that should be printed to the log and text page.
- aiSeverity: The severity of the trace statement. Info, the default, shows up as green; warnings will show up as yellow; and errors as red; in the Papyrus debug text page.
- Default: 0 (Info)
- The following values are acceptable:
- 0: Info
- 1: Warning
- 2: Error
Return Value[edit | edit source]
None
Examples[edit | edit source]
; Output "Hello World" to the log and a message box
Debug.TraceAndBox("Hello, World!")
; Output "Hello World" to the log at error severity, and show a message box
Debug.TraceAndBox("Hello, World!", 2)