Difference between revisions of "Debugging Techniques"
m (→Simplifying: updated some text)
|Line 1:||Line 1:|
These techniques should help you to find bugs
These techniques should help you to find bugs when you're scripting
Revision as of 03:10, 3 July 2006
These are only a few techniques should help you to find bugs more effciently when you're scripting. It should be noted that any techniques unless otherwise specified will work in each of the BI game titles.
Feel free to add any tips that you may feel will benefit other Operation Flashpoint/Armed Assault fans.
If something is not working, check which variables could be wrong, check the output of the variables using hints.
Vektorboson released a 'debugging console for advanced users that is very helpful at debugging your scripting in real time.
Documentation on using the console can be found http://home.arcor.de/vektorboson/res/console2.0docs.zip here).
If you're at an advanced stage of a project, you can save the game when the bug appears and check the variable and script states with Chain of Command's Binary gamefile viewer.
Keep it simple
If your having great difficulty solving a problem, simplify the problem, take the part of the mission which does not work paste it into a new test mission, so that you don't have to watch/whatever the effect of the whole rest of the script(s).
If you're scripting for an addon, don't pack the scripts in the PBO, as you have to restart after every change, make a test mission with the script included there.