Page 1 of 1

"Specified cast is not valid" when using Playmaker Load

PostPosted: Sun Jun 09, 2019 5:30 pm
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.

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

PostPosted: Mon Jun 10, 2019 4:47 pm
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

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

PostPosted: Mon Jun 10, 2019 10:37 pm
by DeadCoffeeGames
Here is the save action.

P.S. I love the tool, it has helped immensely with the development time!

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

PostPosted: Tue Jun 11, 2019 6:01 pm
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

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

PostPosted: Fri Jun 21, 2019 7:47 am
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

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

PostPosted: Mon Jul 08, 2019 2:41 pm
by DeadCoffeeGames
Thank you sir!