Hello, So im trying to save an array or pawns which have struts and variables attached to it. Every time I try to load the pawns then spawn them. I tend to get a not valid object on the saved array. I can load an array or struts no problem it seems to be only the array of pawns that is the problem.
Def gonna need way more info to figure out what is wrong with a save/load system. You need to post screen shots of how the arrays are created, the save game object creation, the load game script etc.
You never actually “save” anything here. I don’t see a “save function” just a load function where you create a save game object, set it as a variable, then load a game slot, cast to your save game object then save over the variable. That does not make logical sense. Think about the first time you run this, your logic is as follows:
Create a blank save game object
Save this as a variable
Load game from slot ??? What slot? When did you save to slot?
Overwrite blank save game object with the empty save game data from the non-existent slot
Pull out the empty data and set the variables to wherever you got your array data from
Before you “Load” anything from slot, there should be a “Save Game To Slot” first…not after. The only “Save Game To Slot” node I see, comes after a load game…very weird.
Still can’t figure out the order of all these operations. Order is very important when saving and loading. All the nodes you cut off (the long white execution lines) I need to see where they are going, who calls what functions etc. Can’t really figure out the logical order of this stuff without seeing the beginning.
What kind of error message comes up or do you mean a full crash and exit and you have to restart the editor? Also can you try just saving an array of pawns? Forget the struct for now?