TraceConditional - Debug: Difference between revisions

Jump to navigation Jump to search
m
Convert source tags to syntaxhighlight
imported>Thingy Person
m (Convert source tags to syntaxhighlight)
 
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
Function TraceConditional(string TextToPrint, bool ShowTrace) global
Function TraceConditional(string TextToPrint, bool ShowTrace) global
if ShowTrace
if ShowTrace
Line 12: Line 12:
EndIf
EndIf
EndFunction
EndFunction
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 22: Line 22:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Output "Hello World" to the log, but only if the bdebug variable is true
; Output "Hello World" to the log, but only if the bdebug variable is true
Debug.TraceConditional("Hello, World!", bDebug)
Debug.TraceConditional("Hello, World!", bDebug)
</source>
</syntaxhighlight>


== See Also ==
== See Also ==

Navigation menu