"Specified cast is not valid" when using Playmaker Load

Discussion and help for Easy Save 3
Post Reply
DeadCoffeeGames
Posts: 3
Joined: Sun Jun 09, 2019 5:20 pm

"Specified cast is not valid" when using Playmaker Load

Post by DeadCoffeeGames »

When using load on playmaker for ints and bools after saving the engine gives a "Specified cast is not valid" error. Arrays and Gameobject's work fine so I am unsure as to why. This only started recently, it worked fine previously and I have not updated anything in that time.

EDIT. If I delete the save file it works fine but once it saves it gives this error.
Attachments
Only Saving Array and Gameobject
Only Saving Array and Gameobject
Screenshot (29).png (109.22 KiB) Viewed 690 times
The Console
The Console
Screenshot (28).png (70.49 KiB) Viewed 690 times
With Loading Bool
With Loading Bool
Screenshot (27).png (115.96 KiB) Viewed 690 times

User avatar
Joel
Moodkie Staff
Posts: 2753
Joined: Wed Nov 07, 2012 10:32 pm

Re: "Specified cast is not valid" when using Playmaker Load

Post by Joel »

Hi there,

Please could you show me the actions you are using to save? This error is thrown when the type of data you are loading is different to the action you are using to load it with.

All the best,
Joel
Joel @ Moodkie Interactive
Twitter - Unity

DeadCoffeeGames
Posts: 3
Joined: Sun Jun 09, 2019 5:20 pm

Re: "Specified cast is not valid" when using Playmaker Load

Post by DeadCoffeeGames »

Here is the save action.

P.S. I love the tool, it has helped immensely with the development time!
Attachments
Save Action
Save Action
Screenshot (32).png (110.34 KiB) Viewed 685 times

User avatar
Joel
Moodkie Staff
Posts: 2753
Joined: Wed Nov 07, 2012 10:32 pm

Re: "Specified cast is not valid" when using Playmaker Load

Post by Joel »

Thanks for the praise, much appreciated.

With regards to your error, I don't appear to be able to replicate this at my end. Please could you PM me a project and instructions to replicate it?

All the best,
Joel
Joel @ Moodkie Interactive
Twitter - Unity

User avatar
Joel
Moodkie Staff
Posts: 2753
Joined: Wed Nov 07, 2012 10:32 pm

Re: "Specified cast is not valid" when using Playmaker Load

Post by Joel »

Hi there,

Thanks for sending over the project, I've managed to locate the problem.

You have not set the global variables you are using as the Key to a value (i.e. these are blank strings). See the image below. This means that all data will be saved to the same key, meaning that the key will be overwritten each time you save, so there will only ever be one piece of data in your file.

All the best,
Joel
Attachments
Screenshot 2019-06-21 at 08.47.27.png
Screenshot 2019-06-21 at 08.47.27.png (47.57 KiB) Viewed 648 times
Joel @ Moodkie Interactive
Twitter - Unity

DeadCoffeeGames
Posts: 3
Joined: Sun Jun 09, 2019 5:20 pm

Re: "Specified cast is not valid" when using Playmaker Load

Post by DeadCoffeeGames »

Thank you sir!

Post Reply