Debugging Techniques: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fixed category.)
mNo edit summary
Line 17: Line 17:
*In Armed Assault the [[arma.RPT]] is your first and foremost thing to check when you have problems with custom addon configs or mission scripts!
*In Armed Assault the [[arma.RPT]] is your first and foremost thing to check when you have problems with custom addon configs or mission scripts!
   
   
*[[User:Vektorboson|Vektorboson]] released a [http://home.arcor.de/vektorboson/res/console_3.7z debugging console] for advanced users that is very helpful at debugging your scripting in real time. Please note, that this is for OFP only.


Armed Assault debug consoles:
== Debug Consoles ==
 
=== Arma: Cold War Assault ===
*[[User:Vektorboson|Vektorboson]] released a [http://home.arcor.de/vektorboson/res/console_3.7z debugging console] for advanced users that is very helpful at debugging your scripting in real time.
 
=== Arma: Armed Assault ===
*[http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=1593a8bb7375674288e681ba36b48dc3;act=ST;f=70;t=56294 Debug console] made by [[User:Str|Str]]. It's in form of addon and it's available in all singleplayer missions, intros and outros. Easy and simple to use (Escape-Enter execute).
*[http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=1593a8bb7375674288e681ba36b48dc3;act=ST;f=70;t=56294 Debug console] made by [[User:Str|Str]]. It's in form of addon and it's available in all singleplayer missions, intros and outros. Easy and simple to use (Escape-Enter execute).
*[http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=c10d84cce14a63a54ac915506d008e80;act=ST;f=69;t=57493 TroopMon V 0.7 *Mission debugger] - Complex debugging system providing lot of informations for mission-makers, escpecially about AI.
*[http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=c10d84cce14a63a54ac915506d008e80;act=ST;f=69;t=57493 TroopMon V 0.7 *Mission debugger] - Complex debugging system providing lot of informations for mission-makers, escpecially about AI.


ARMA 2 debug consoles
=== Arma 2 ===
*[http://temp.moricky.com/arma2/stra_debug2.rar Debug console] by [[User:Str|Str]]
*[http://temp.moricky.com/arma2/stra_debug2.rar Debug console] by [[User:Str|Str]]
*[http://www.armaholic.com/page.php?id=7948 TroopMon2] by Charon Productions
*[http://www.armaholic.com/page.php?id=7948 TroopMon2] by Charon Productions
*[http://forums.bistudio.com/showthread.php?t=126249 DevCon] ny [[User:Kju|Kju]]


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''' [http://www.mapfact.net/include.php?path=content/download_eng.php&contentid=282 Binary gamefile viewer].
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''' [http://www.mapfact.net/include.php?path=content/download_eng.php&contentid=282 Binary gamefile viewer].
=== Take On Helicopters ===
The game already features [[Mission_Editor:_Debug_Console|Debug Console]] in basic installation.


==Keep it simple==
==Keep it simple==

Revision as of 10:29, 10 November 2011

Introduction

These are a few techniques which should help you to find bugs more efficiently 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.


Check for basic errors before running the script

You can use squint to check for syntax and logic errors such as missing semicolons, brackets and incorrect use of types even before running your script in ArmA.

Hints

If something is not working, check which variables could be wrong, check the output of the variables using hints.

  • In Armed Assault the arma.RPT is your first and foremost thing to check when you have problems with custom addon configs or mission scripts!


Debug Consoles

Arma: Cold War Assault

Arma: Armed Assault

  • Debug console made by Str. It's in form of addon and it's available in all singleplayer missions, intros and outros. Easy and simple to use (Escape-Enter execute).
  • TroopMon V 0.7 *Mission debugger - Complex debugging system providing lot of informations for mission-makers, escpecially about AI.

Arma 2

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.

Take On Helicopters

The game already features Debug Console in basic installation.

Keep it simple

If you're 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 the effect of the rest of the script(s).

Show Script Errors

Start the game with the parameter "-showscripterrors" and this will show syntax issues and other problems right away in-game.

In addition, you can check the .rpt log files that get generated to see past errors and problems in detail.

Addon Tips

If you're scripting for an addon, don't pack the scripts in the PBO, as you have to restart after every change. Rather, make a test mission with the script included there.