UE4 4.7 Cast to SaveSystem fail

I’m following a book called “Blueprints Visual Scripting for Unreal Engine”.

In Chapter 7 we try to “Load a save point or create a new one”.

From the “EventBeginPlay” node I connected to a “DoesSaveGameExist” node, which in turn connects to a “Branch” node. From the True output pin I connected a “LoadGameFromSlot” node and into a “CastToSaveSystem” node. I ran two “PrintString” nodes from both the output execution pin and the “Cast Failed” pin for testing and the result is the cast fails every time.

I have followed the book precisely. I have been over every sentence to make sure that I didn’t make a typo or the like. Everything is as it is supposed to be according to the book but the cast still fails.

Everything else was working and continues to work until I hook up the nodes described above. The nodes were placed in the “Draw HUD to screen.” set of nodes I built in the book in chapter 3. I created a new Blueprint Class of type “Save System” and named it “SaveSystem” for use in the “FirstPersonCharacter” blueprint…

Basically I’m stuck and almost at the end of the book. I could really use a little help here. If you need screenshots or more info. just ask.

Thanks in advance.
copyright08081972

BTW, I would have liked to use a newer version of UE but they aren’t compatible with the book. I tried 4.13 and 4.10.

add an is valid check between the load from slot and cast. See if the load is what’s failing. See if the save game is failing to load even though it exists. I’ve had that happen and I just deleted the old data and had it recreate it on next launch.

Very new to this. I’m not sure what to do with the IsValid node. I compiled and played after adding it and nothing changed. The cast is still failing.

I deleted the save file and it created a new one just fine but on the second round (using a multiplier with the level to determine the number of enemies spawned) it goes back to cast failing.

I do believe it is failing to load the save but have no clue as to why.

Permissions maybe? I last coded when Slackware 12.2 was new and that was just some C and bash scripting to automate some things. I’m really getting into UE4 though and would really like to figure this out. Any help appreciated.

Here are the screen shots. SaveSystem (without a space) is a blueprint I made as type Save System and it holds a single variable (int) called CurrentRound.

I hope this helps you all help me figure this out. I’m really excited about being almost done with my first game. As soon as the level system/save system works it will be finished. It is nothing marketable. I just followed a book. As soon as I am done though I want to start on a game of my own design.

Keeping this alive. No clue how long it has before it automatically marks it resolved. Still stuck so… Thanks in Advance.

You need to plug in the blue dot from the load game into the isvalid.

Not Valid.

Then for some reason it’s not considering your save valid. Try changing the name of the Load and does exist from BlueprintGameSave to something like BPGSave.

Changed the name but same result. Says “not valid” when it runs the second time. It is creating the file. I looked with in the file browser and seen it.

Keeping alive.

No more thoughts? I’ve been reading and looking for anything that would help but have not had any luck. Thank you regardless.

I think I have it figured out. I’ll use the IsValid node to read the save file or (if not valid) create one. I’ll reply here to how it works.