Difference between revisions of "Debug Scripts"
no edit summary
imported>AdiBeiElderScrolls |
imported>AdiBeiElderScrolls |
||
|
... and so on
; and if you want to have the messages for each frame
; slowly passing by, you
; beginning or the end of the GameMode block, like
If debugOn
ShowEnchantment
EndIf</pre>
You may also want to start the debug session on a defined point in your code. Nothing easier than that:
<pre>short debugOn
; save setting, for avoiding to be overruled by topics
; comment it out, if necessary
Set debugOn to 0
... your code
If debugOn
Message "whatever you want to say %.0f" MyVar
EndIf
... your code
If YourConditionBlockToInspect
Set debugOn to 1
; get from here on all your messages
If debugOn
Message "whatever you want to say %.0f" MyVar2
EndIf
; stop getting messages for this frame
Set debugOn to 0
EndIf
... and so on
; and if you want to have the messages for each frame
; slowly passing by, you add a ShowEnchantment at the
; very end of the GameMode block this time, like
If debugOn
ShowEnchantment
EndIf</pre>
[[Category:Scripting]]
| |||