Load Method overload issue

Discussion and help for Easy Save 3
Post Reply
eelcapitan
Posts: 4
Joined: Fri Nov 20, 2020 11:24 am

Load Method overload issue

Post by eelcapitan »

Hi,
I have an issue and I dont know what Im doing wrong.

Ill try to load a string with a default value of "" (nothing). Here is the code line:

gameClosed = ES3.Load<string>("gameClosed", "");

When I do that it gets me the error that there is no Es3Settings file. The overload method of load allows to set a default value, but I have
the impression it does not work. For ints and all other stuff it does work, for string big NO.

What happens there? Can somebody tell??

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

Re: Load Method overload issue

Post by Joel »

Hi there,

This is because C# defaults to the overload which expects the second parameter to be a filename when loading strings.

For this circumstance we've provided the ES3.LoadString method which you can use instead.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
eelcapitan
Posts: 4
Joined: Fri Nov 20, 2020 11:24 am

Re: Load Method overload issue

Post by eelcapitan »

Thank you very much.. That solved the issue.

Have a nice weekend and thanks for the fast response. :D
eelcapitan
Posts: 4
Joined: Fri Nov 20, 2020 11:24 am

Re: Load Method overload issue

Post by eelcapitan »

Well, actually it still didnt work.. I dont know why..

gameClosed = ES3.LoadString("gameClosed", "");

FileNotFoundException
ES3.Load[T] (System.String key, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:370)
ES3.Load[T] (System.String key, System.String filePath, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:355)
ES3.LoadString (System.String key, System.String defaultValue, System.String filePath) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:521)
PlayerManager.LoadAndUpdate (System.String variableName) (at Assets/Scripts/PlayerManager.cs:441)
PlayerManager.Start () (at Assets/Scripts/PlayerManager.cs:164)
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Load Method overload issue

Post by Joel »

Hi there,

I think I know what the issue is. If you private message me your invoice number I can send over an update to address this.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
eelcapitan
Posts: 4
Joined: Fri Nov 20, 2020 11:24 am

Re: Load Method overload issue

Post by eelcapitan »

Ill did send you the Invoice number. Thanks in advance..
Post Reply