mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-08 01:47:50 -05:00
Create debugging_guide.md
This commit is contained in:
parent
0f05962cf6
commit
df243fbb50
49
debugging_guide.md
Normal file
49
debugging_guide.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
## The Basics
|
||||||
|
|
||||||
|
Each of the decompilers isn't able to 100% decompile scripts exactly as the original script is.
|
||||||
|
|
||||||
|
However if you compare the outputs of multiple decompilers its possible to get a clearer picture of what the developers had actually coded.
|
||||||
|
|
||||||
|
### Common Decompiler Errors
|
||||||
|
|
||||||
|
#### 2014 dump
|
||||||
|
|
||||||
|
The basic bo2 zombies dump featured in the readme is from 2014 and in this guide will be refered to as the 2014 dump.
|
||||||
|
|
||||||
|
The 2014 dump is the best dump to start with as a base script since while it has many errors its output is the most similar to the original decompiled scripts.
|
||||||
|
However, it struggles with properly placing devcalls, and misidentifies periods as commas so definitely check waits and other functions that use decimal inputs.
|
||||||
|
Additionally the 2014 dump doesn't ever use for loops or foreaches so as a result it uses some odd logic at times.
|
||||||
|
|
||||||
|
The 2014 dump also will misidentify if statements as while loops as well as improperly place if/else statements.
|
||||||
|
The 2014 dump may also misidentify conditions in if/else statements.
|
||||||
|
The 2014 dump may mistakenly add extra :: at the start of a pointer calling a function from another script.
|
||||||
|
|
||||||
|
Finally the 2014 dump has an issue where it uses the wrong numbers when dealing with functions using vector type functions.
|
||||||
|
|
||||||
|
#### Cerberus Decompiler dumps
|
||||||
|
|
||||||
|
The Cerberus Decompiler works well with if/else statements and can output code using for loops and foreaches unlike the 2014 dump.
|
||||||
|
|
||||||
|
However, the Cerberus Decompiler should not be used as a base script since its output is intended for use in bo3 scripting, and as a result would have a lot of errors.
|
||||||
|
The Cerberus Decompiler is similar to the 2014 dump except it doesn't misplace devcalls, and commas.
|
||||||
|
Just like the 2014 dump it may also misidentify if/else statement conditions.
|
||||||
|
|
||||||
|
### Debugging Methodology
|
||||||
|
|
||||||
|
The current method used is to compare each function from a script from the 2014 dump to the Cerberus Decompiler's output,
|
||||||
|
Copying code from the Cerberus Decompiled output if the code from the 2014 dump looks wrong is recommended.
|
||||||
|
Each time you do this make sure to indicate that the code was checked in a comment next to the function so that way its easy to tell what functions have been checked and changed from their original outputs
|
||||||
|
Once you have checked the code in a script try compiling it and test it to see what errors occur.
|
||||||
|
|
||||||
|
**Common Errors**
|
||||||
|
|
||||||
|
Infinite While Loop Without Wait:
|
||||||
|
|
||||||
|
When its not possible to connect to the server but its running that means there is an infinite loop with no wait active.
|
||||||
|
|
||||||
|
This can also happen ingame but the zombies freeze and the ammo counter freezes.
|
||||||
|
|
||||||
|
This can also happen when a client connects so controls are frozen.
|
||||||
|
|
||||||
|
This can also happen with a blackscreen that doesn't pass.
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user