Dealing with offset errors. - berichan/ACNHMobileSpawner GitHub Wiki

If you get "FailValidate" or "Index was outside of the bounds of the array" as an error often, and are unable to locate which plugin/cheat/sysmodule is causing the problem, you can check how large your byte offset error is by using the built-in hex editor, starting with version 0.63-a in the additional panel (the + button in the bottom right corner). While this isn't the usual use for a hex editor, we can use it to check for this type of error. The hex editor works via both sys-bot and USB.

This should be used as a last resort. Turning off all plugins/cheats/optional sysmodules should be tried as a solution first.

Process

Firstly, you should remove everything from your inventory, and put something you know the hex value of in your first inventory slot. For this example, we'll use a weed.

Go into the app, connect like normal, but instead of pressing Read RAM, we'll go to the additional panel by pressing "+" in the botton right corner, and selecting the "Hex Edit" tab.

Key in the known offset for the inventory. For 1.3.0/1.3.1 this is ABA526A8. You can usually view the latest known offset in the settings within the app, and most of the time I'll try to leave it as that in the Hex Edit window.

Keep the length at 1024 and press "Begin hex edit". Let it go through the process.

This window will show up and show you the values you have in RAM at that offset. We can see the first two values in the image above are "40" and "0A", this is the correct hex value for a weed. It's followed by a lot of "FE" and "FF" which combined, are the value for "No Item" or better known as an empty inventory space.

If this isn't the first value you see, then it might be the first, second, third, even three hundredth value you see. You need to find out how far away this value is to know your offset error. Once you find it, simply add the amount it was off by to the hex value in the settings, or in other additional panels such as the turnip or money miles panels. Remember that these are hex values, so for example, if your weed value was 30 bytes away, you would need to add "1E" to your offset. A calculator is available here.