kwsch / pkNX

Pokémon (Nintendo Switch) ROM Editor & Randomizer
https://projectpokemon.org/home/forums/topic/48647-pknx-nintendo-switch-rom-editor-randomizer/
GNU General Public License v3.0
343 stars 108 forks source link

[PLA] Index out of bounds exception when trying to edit personal #275

Closed Jmc1922 closed 1 year ago

Jmc1922 commented 1 year ago
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at pkNX.WinForms.PokeDataUI8a.LoadPersonal(IPersonalInfoPLA pkm) in D:\a\1\s\pkNX.WinForms\Subforms\PokeDataUI8a.cs:line 213
   at pkNX.WinForms.PokeDataUI8a.LoadIndex(Int32 index) in D:\a\1\s\pkNX.WinForms\Subforms\PokeDataUI8a.cs:line 178
   at pkNX.WinForms.PokeDataUI8a.UpdateIndex(Object sender, EventArgs e) in D:\a\1\s\pkNX.WinForms\Subforms\PokeDataUI8a.cs:line 168
duckdoom4 commented 1 year ago

Thanks for the bug report, I'll have a look at it later today. Did you by any chance only dump the main game without updates?

duckdoom4 commented 1 year ago

Also, could you comment on what you did to get the error to occcur?

Jmc1922 commented 1 year ago

I was on the Pokémon editor button and was scrolling through the Pokémon then when I got to kleavor it froze and PKNX was saying he was a normal type and had no data basically then when I got to Ursuline that error message popped up

duckdoom4 commented 1 year ago

Should be fixed now :)

Jmc1922 commented 1 year ago

No I dumped the game using updates , it’s been fine but now it doesn’t have any data for Kleavor-enamourus

duckdoom4 commented 1 year ago

image It does for me. Possibly due to the previous bug, it saved empty data.

You can try to delete the file arceus\romfs\bin\pml\personal\personal_data_total.perbin. This is the modded file. Note the arceus\! The clean files are in romfs without the arceus prefix.

Your clean file should then be picked up again, which should contain the original data.