CODE UPDATE 1: AddValue macro
There are a few things that might be affected if you update rom 4.0.6 to 4.0.11. The most overt of these is the following:
Any code which uses the macro AddValue or SubtractValue will have to be updated. In the tutorial, one such piece of code was the Powerup_IncreaseMoney.asm script (another being the increase score script). If you get any error that mentions the AddValue or SubtractValue script, you need to navigate to the file it told you the error was in. The fix is very easy.
The old routine would have said something like:
This is a macro function that told the engine to add value to a multi-byte variable. The three arguments tell it:
arg0 - #$03 ... this told it that the variable you were going to update has 3 places (ones, tens, hundreds)
arg1 - myVariable ... this is the name of the variable that you want to update
arg2 - #$01 ... how much do you want to increase the number by? (0-9)
The NEW routine adds an extra argument:
arg3 - #$00 ... this tells it what "place" to update. If it is zero, it updates the ones place. If it is one, it updates the tens place. If it is two, it updates the hundreds place. Etc, etc, etc.
If you add a comma, and the intended place to update as the next argument, that should fix this error.
There are a few things that might be affected if you update rom 4.0.6 to 4.0.11. The most overt of these is the following:
Any code which uses the macro AddValue or SubtractValue will have to be updated. In the tutorial, one such piece of code was the Powerup_IncreaseMoney.asm script (another being the increase score script). If you get any error that mentions the AddValue or SubtractValue script, you need to navigate to the file it told you the error was in. The fix is very easy.
The old routine would have said something like:
Code:
AddValue #$03, myVariable, #$01
This is a macro function that told the engine to add value to a multi-byte variable. The three arguments tell it:
arg0 - #$03 ... this told it that the variable you were going to update has 3 places (ones, tens, hundreds)
arg1 - myVariable ... this is the name of the variable that you want to update
arg2 - #$01 ... how much do you want to increase the number by? (0-9)
The NEW routine adds an extra argument:
Code:
AddValue #$03, myVariable, #$01, #$00
arg3 - #$00 ... this tells it what "place" to update. If it is zero, it updates the ones place. If it is one, it updates the tens place. If it is two, it updates the hundreds place. Etc, etc, etc.
If you add a comma, and the intended place to update as the next argument, that should fix this error.