Page 1 of 2

I cant delete the file on game

Posted: Fri Mar 26, 2021 10:38 pm
by WaruGameDev
Hi people!
I hope you finds well!

I am having a struggle deleting or clearing the data of my game. I am working on a clikcer so I am using the auto save option, and I triggered from code with:
http://prntscr.com/10wkg1c
But i can't delete the file...
simple doesn't work :c
http://prntscr.com/10wkh0f
Best!

Re: I cant delete the file on game

Posted: Fri Mar 26, 2021 10:47 pm
by Joel
Hi there,

By default Auto Save stores to the cache before writing to file. Have you tried deleting the file from the cache? I.e.

ES3.DeleteFile(filename, new ES3Settings(ES3.Location.Cache));

All the best,
Joel

Re: I cant delete the file on game

Posted: Fri Mar 26, 2021 11:05 pm
by WaruGameDev
Hi!
I try that and doesn't work.
This is my configuration

http://prntscr.com/10wl2g8

Here is the new code because i am saving on a file


http://prntscr.com/10wl20q

best!

Re: I cant delete the file on game

Posted: Sat Mar 27, 2021 9:36 am
by Joel
Hi there,

I'm still not able to replicate this at my end I'm afraid. Firstly, please ensure you're using the latest version of Easy Save.

If this doesn't resolve the issue, please could you create a brand new, basic project with a simple scene which replicates this and private message it to me?

All the best,
Joel

Re: I cant delete the file on game

Posted: Mon Apr 05, 2021 11:56 pm
by WaruGameDev
Hi!
We actually managed how deleted the data. But we get a bug.
After delete the data on the phone we can't save the game again.

this is the save code
http://prntscr.com/1158itd

and this is the delete code
http://prntscr.com/1158klz

This are the configuration of ES3
http://prntscr.com/1158lay

And this is the auto save of ES3
http://prntscr.com/1158mat

Best and thanks on advance!

Re: I cant delete the file on game

Posted: Tue Apr 06, 2021 7:58 am
by Joel
Hi there,

There is an error in your code. You're only saving if your file exists, and your ES3File line will not create a new file because no data has been added to it.

All the best,
Joel

Re: I cant delete the file on game

Posted: Tue Apr 06, 2021 3:06 pm
by WaruGameDev
Butm if I delete the file.
How you create a new one?
or is automatic?
Best

Re: I cant delete the file on game

Posted: Tue Apr 06, 2021 3:39 pm
by Joel
Files are automatically created if they don't exist.

All the best,
Joel

Re: I cant delete the file on game

Posted: Wed Apr 07, 2021 3:38 pm
by WaruGameDev
Hi! now the save is wornking but the delete data doesn't :c

the delete script (I changed from file to cache)
http://prntscr.com/116lfa1

the save script
http://prntscr.com/116lgmn

the easy save config
http://prntscr.com/116lij5


suto save
http://prntscr.com/116li0i


best

Re: I cant delete the file on game

Posted: Wed Apr 07, 2021 3:50 pm
by Joel
Hi there,

You're deleting the data from the cache. If you want data to be deleted from both places then you should use two ES3.DeleteFile calls.

All the best,
Joel