Page 1 of 1

Getting weird errors.

Posted: Wed Mar 18, 2020 5:09 am
by NoahB
Hi when I try to load or save I get the two errors, how would i fix these errors? I don't know what info I should give so here:

Heres the load error:
https://pastebin.com/s5mK7XeX

Heres the save error:
https://pastebin.com/4AhBR1kN

Picture 1:
https://gyazo.com/9732a33a939366d8651dd70bebc570b1

Picture 2:
https://gyazo.com/05dff2eed97311e2c83461bd7ebde58e

Re: Getting weird errors.

Posted: Wed Mar 18, 2020 7:50 am
by Joel
Hi there,

The error suggests that the generic parameter you're providing does not match the type of data that you are saving. For example, this would cause the save error:
float myFloat = 123f;
ES3.Save<int>("key", myFloat);
And similarly, this would cause the load error:
float myFloat = 123f;
ES3.Save<float>("key", myFloat);
ES3.Load<int>("key");
Would you be able to show me the code you are using to save and load?

All the best,
Joel

Re: Getting weird errors.

Posted: Wed Mar 18, 2020 5:56 pm
by NoahB
Save & Load Script + Delete: https://pastebin.com/tTgPST10

Re: Getting weird errors.

Posted: Wed Mar 18, 2020 5:57 pm
by Joel
Hi there,

There is a mistake in your code. You're trying to load from the same key twice here, once as an int and once as a float:
LevelManager.instance.currentPts = ES3.Load<int>("currentPts");
LevelManager.instance.currentVol = ES3.Load<float>("currentPts");
All the best,
Joel

Re: Getting weird errors.

Posted: Wed Mar 18, 2020 6:00 pm
by NoahB
Actually I fixed that, its still giving me the same errors. https://pastebin.com/nVY27dEY

Re: Getting weird errors.

Posted: Wed Mar 18, 2020 6:03 pm
by Joel
Hi there,

Firstly, I would try deleting your existing save data by going to Window > Easy Save 3 > Tools > Open Persistent Data Path, and deleting the data from there.

If this doesn't resolve the issue, please could you private message me a basic project or script which replicates this?

All the best,
Joel

Re: Getting weird errors.

Posted: Wed Mar 18, 2020 6:35 pm
by NoahB
Joel wrote:Hi there,

Firstly, I would try deleting your existing save data by going to Window > Easy Save 3 > Tools > Open Persistent Data Path, and deleting the data from there.

If this doesn't resolve the issue, please could you private message me a basic project or script which replicates this?

All the best,
Joel
Yeah, it still doesn't want to work. So I sent a pm.