29 July 2013

if ( debugMode )

I have been struggling with my recent scripting project, and I found a simple solution: add a lot of announcement checkpoints throughout the script so that I may follow the script's progress:
    if ( debugMode ) log( "Scanning " + theIncomingText );
This was incredibly helpful in finding bottlenecks, missing data and other shenanigans caused by me whilst attempting to write this code quickly.  As a result of these internal announcements, I was able to find numerous bugs, squash them, and get my script running in an "as expected" manner!

Next up comes the long, dull portion of adding controls and restrictions (silly stuff, like "don't use a tinderbox while the player is under water" kind of logic).  But I am pleased to be reaching this point, as it is an indication of progress!

1 comment:

  1. Print all the things! Always a staple of debugging...

    ReplyDelete