apocalypse~r
Joined: 21 Jun 2007 Posts: 24
|
Posted: Tue Mar 11, 2008 10:54 pm Post subject: debugmsgbox(...) function |
|
|
a helpful function.
since we all know that when we are debuging a script that handles lots of numbers and such, and something manages to go spectacularly wrong, we fill the script with messageboxes to figure out where the error is occurring. introducing: debugmsgbox(...). in the beginning of your script, add this function. then somewhere in the autoexecute section, define a_debugmsgbox as 1 or 0. if its 0, msgboxes wont show. if its 1, they will.
| Code: | debugmsgbox(title = "", text = "Press OK to Continue.", timeout = "")
{
global a_debugmsgbox
if not a_debugmsgbox
return
msgbox, 0, %title%, %text%, %timeout%
} |
_________________ problems := bugs + errors + glitches
code := (problems != 0) ? debug(code) : celebrate() |
|