omegakyogre wrote:
Hiei-YYH wrote:
another error i noticed in the money code (didn't used, just looking at it)
0220464F 05F5E100
8bit addresses: 1,3,5,7,9,B,D,F
16bit addresses: 0,2,4,6,8,A,C,E
32bit addresses: 0,4,8,C
take a look, then it should be
0220464C 05F5E100
I don't think I understand why those addresses must end in those numbers... Could you enlighten me?
The code I wrote down works as intended without any issue, so it shouldn't be erroneous.
Technically, it should work how you are thinking, but if it did, your code wouldn't work.
CE can do it from any address, the AR code handler works as follows:
For 32bit (4 byte) codes, the AR follows the strict 32bit rule Hiei posted.
Meaning, if you use an address landing on 1-3, it'll act as 0, 5-7 will act as 4, 9-B will act as 8, and D-F will act as C.
It's just how it works.
So yes, your code does work, but it's not proper.
If it did work like in CE, your code would have a major flaw, you'd be writing only the far right byte to any part of the money address, therefore resulting in your Rep being 0.
Now with more complex codes, such an error would mess up your code, so it would be good to get in the habit of writing it properly now.