Hello, I’ll try to make this concise. I’m trying to make a save system, and right now I’m in need of assistance. I have a menu that allows players to create 5 saves. Each save is titled Player1, Player2, Player3, so on. It seems as if everything is named accordingly, and it typically prints string saying it saved to the correct slot. But when I load in, often a save will end up loading in the first save slot. Here’s a video example. When the save and go to main menu button is pressed, you can see that the save #2 is then saved to SSPrototypeMap1, when it’s meant to save to SSPrototypeMap2. I can’t seem to find where this problem may be coming from. The saved blueprint is sometimes correct, though, so I’m not sure.
I’m a little lost at what to do. With the knowledge that I already have, I’ve tried to fix these issues, but I have a lot left to learn. Here are the related blueprints.
Right now, my SaveNPCData isn’t working properly, but that’s a separate issue I know how to fix, I just haven’t gotten to it yet. Hopefully this was understandable. Thank you!!
This was a helpful question! Turns out I had neglected to add “create save game object” if the save game wasn’t already existing/set. I used the ‘does slot exist’ to determine if a new save game object was to be created. I’ll put the updated BPs below. It doesn’t seem like that fixed the incorrect save loading, but I’m really glad you caught that!
Yes, so it seems the “Slot Number” input on the load function is always 1. I ran into this issue before, but I thought I’d fixed it. So the game mode (x) is the one calling Load Game, and before that, it is set by a variable in a function in the game mode (x) which is called by pressing the “Load Save” Button (x). I had gotten some help for the last part, the pass-by-reference was said to have fixed the issue where the variable wasn’t actually setting when it was read in the game mode. Hoping that makes sense.
If the slot is not found, that isn’t an error the way I’ve done it, it just means they haven’t saved before. I’m not sure if that’s the smart thing to do, but it seems to work!