Lesson #15 - Debugging Your Script ---------------------------------- This is the final lesson in my first tutorial set of lessons on the {COMMO} macro language. Stay tuned for the next set which will discuss more advanced script topics.. Debugging is the art of determining what went wrong with your script, and what needs to be done to make it right. There are two error categories which can cause your script to fail: a. Syntax Errors - Examples include misspelled macro commands, missing colons in macro IDs, extra spaces in commands, missing "braces", extra punctuation, invalid command switches, etc. These type errors are sometimes very difficult to detect since the commands you are using are not "pure English". You must carefully scrutinize offending command lines when they are highlighted by {COMMO}. b. Logical Errors - All the syntax is correct, however, your script program flow is incorrect. Subroutines are executed out of sequence, important routines are skipped, etc. Oftentimes, logical errors can go undiscovered unless you pay close attention to script flow. After all, it's easy to miss something if everything *seemed* to work OK. The single most significant tool you have at your disposal during the debugging process is a literal (raw) capture file of the failed BBS session. That's why I included setting a capture file as one of the "enhancements" during a previous lesson. The second most significant tool you have is your script flowchart. The flowchart will provide you a picture of _what_ should be going on. Comparing the _what should_ to the _what did_ will often illuminate logical errors. Finally, if all else fails, a significant tool you have is a "second set of eyes", i.e., post script segments that are causing you difficulty in various {COMMO} support conferences. There is a wealth of talent available...don't be afraid to use it. Be sure to include as much information as you can about what seems to be going wrong with your script. Debugging is a continuous process. Sysops are going to make changes that will affect your script. Don't be discouraged by the process..it's something we all have to do. This lesson concludes the first set of lessons. I will be continuing the series..more advanced topics will follow. Hopefully, this first set has provided you enough information to get you on your way to writing scripts. If you've enjoyed this first set, I have two simple requests: - Please register your copy of {COMMO} if you already haven't done so - Please let me know what areas you'd like to see covered in the next set. I will be glad to oblige if it's within my ability. I want you all to know that I appreciate the very positive feedback I've received concerning these lessons. Jim