KeeyanGhoreshi / PokemonPlatinumSingleSequence

A list of inputs that beats Pokemon Platinum
GNU General Public License v3.0
93 stars 4 forks source link

Crashed on run through #5

Open jaredseale opened 3 days ago

jaredseale commented 3 days ago

I started a run and left it on in another room, so I wasn't paying super close attention to anything happening. I came back around 10-ish hours into the run to find the game still and this error in the lua console:

NLua.Exceptions.LuaScriptException: A .NET exception occured in user-code System.ArgumentOutOfRangeException: saveslots are 1 through 10 Parameter name: slotNum at BizHawk.Client.Common.SaveStateApi.SaveSlot(Int32 slotNum, Boolean suppressOSD)

image

I see you just pushed a change to do with save slots less than an hour ago, so I'll set everything up again and try it with the new code. Logging this issue just in case it happens again though!

KeeyanGhoreshi commented 3 days ago

Yes, the commit I just made fixes this issue. Bizhawk version 2.9.1 crashes if it gets an incorrect saveslot num and there was a bug with the saveslot id. Notably the version of bizhawk I use does not produce any error for this, so it slipped through :D

jaredseale commented 3 days ago

Good stuff! Started up another run to test it again.

Morilli commented 2 days ago

This issue is caused by id being a global variable instead of a local one. It gets overwritten with the window's x position here: https://github.com/KeeyanGhoreshi/PokemonPlatinumSingleSequence/blob/79c64dac10f14284f89bceeeb71a7f8d297a250b/commands/movement.lua#L660 I'm not sure why there is a client.xpos() check in the first place, but this could be fixed by simply adding local id; before https://github.com/KeeyanGhoreshi/PokemonPlatinumSingleSequence/blob/5c5f0c0be931ad0d2aafe277154fcb24fd3e672b/commands/1.lua#L1403-L1406

ZacharyGiguere commented 2 days ago

Yeah got this exact same issue and came to the same conclusion as Morilli. Now everything should be fixe. Also, you should try make your savestates working if they don't already. you can find help here https://github.com/KeeyanGhoreshi/PokemonPlatinumSingleSequence/issues/3#issuecomment-2440446833