Array is saving, but not loading

Hello guys! I have save/load system and it’s working perfectly for a lot of variables. But I have a “batteries” in a game on different spots. So after player pickup batterie it’s hide it and add to bool array:

Then, when I step on checkpoint triggerbox, this array is saving to another bool array in my savegame blueprint:

I checked values using print string and they are correct. But for some reasons, after I load this variable, values are default:

Repeat again, that save/load system is working flawless for another variables, except this bool array

Thank you!

Nothing is glaring out the gate, however, you didn’t post any of the save/load functionality that I can see and some other key pieces of logic are missing. That said, if it’s working for other variables in your save I’m going to assume you know what you’re doing on that end. This really comes down to good debugging practices. If this were me I would attempt to isolate the problem to a simple save/load and that’s it, removing any gameplay functionality from the loop. Literally just write a little function that, on a key press, allows you to save some boolean values and load them back in…printing them on save and load. Make sure they line up. If they do, the issue isn’t with the save/load mechanism it’s something wrong with your logic flow.

I would also caution against using GetAllActorsOfClass as your array index. That function is not guaranteed to get all actors in the same order each time for various reasons. You can see some eluding to this exact issue in the following post

Is “get all actors of class” reliable in the order that it puts the actors? : r/unrealengine (reddit.com)

EDIT: Here’s more food for thought

How to save an Array? - Pipeline & Plugins / Editor Scripting - Epic Developer Community Forums (unrealengine.com)

I am not found why this issue happened, but when I put “set array variable” to the beginning of the function (before another set variables) it works. Looks like some of them break my save bool array, but can’t figure which one