File path confusion (noob)
Posted: Fri Jun 21, 2019 4:56 am
Hello,
I've been looking at the documentation, and the filepath has got me a bit stumped.
I had it working in EasySave 2, but I'm getting this error in EasySave 3 with very similar code:
FileNotFoundException: File "C:/Users/Owen Alexander Bowes/AppData/LocalLow/DefaultCompany/Polymath/SaveData.es3" could not be found.
ES3.Load[T] (System.String key, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:268)
ES3.Load[T] (System.String key) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:240)
LoadManager.Load () (at Assets/Scripts/SavingLoading/LoadManager.cs:17)
LoadManager.Start () (at Assets/Scripts/SavingLoading/LoadManager.cs:12)
Here's the code I'm using to load:
baseManager.arrowAmount = ES3.Load<int>("arrowAmount");
baseManager.bowAmount = ES3.Load<int>("bowAmount");
baseManager.swordAmount = ES3.Load<int>("swordAmount");
baseManager.isRaining = ES3.Load<bool>("isRaining");
And the code to save:
ES3.Save<int>("arrowAmount", baseManager.arrowAmount);
ES3.Save<int>("bowAmount", baseManager.bowAmount);
ES3.Save<int>("swordAmount", baseManager.swordAmount);
ES3.Save<bool>("isRaining", baseManager.isRaining);
I know I am missing the filepath parameter, but I'm not sure how to set that up.
I've been looking at the documentation, and the filepath has got me a bit stumped.
I had it working in EasySave 2, but I'm getting this error in EasySave 3 with very similar code:
FileNotFoundException: File "C:/Users/Owen Alexander Bowes/AppData/LocalLow/DefaultCompany/Polymath/SaveData.es3" could not be found.
ES3.Load[T] (System.String key, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:268)
ES3.Load[T] (System.String key) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:240)
LoadManager.Load () (at Assets/Scripts/SavingLoading/LoadManager.cs:17)
LoadManager.Start () (at Assets/Scripts/SavingLoading/LoadManager.cs:12)
Here's the code I'm using to load:
baseManager.arrowAmount = ES3.Load<int>("arrowAmount");
baseManager.bowAmount = ES3.Load<int>("bowAmount");
baseManager.swordAmount = ES3.Load<int>("swordAmount");
baseManager.isRaining = ES3.Load<bool>("isRaining");
And the code to save:
ES3.Save<int>("arrowAmount", baseManager.arrowAmount);
ES3.Save<int>("bowAmount", baseManager.bowAmount);
ES3.Save<int>("swordAmount", baseManager.swordAmount);
ES3.Save<bool>("isRaining", baseManager.isRaining);
I know I am missing the filepath parameter, but I'm not sure how to set that up.