I cant delete the file on game

Discussion and help for Easy Save 3
WaruGameDev
Posts: 7
Joined: Fri Mar 26, 2021 10:28 pm

I cant delete the file on game

Post 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!
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: I cant delete the file on game

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
WaruGameDev
Posts: 7
Joined: Fri Mar 26, 2021 10:28 pm

Re: I cant delete the file on game

Post 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!
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: I cant delete the file on game

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
WaruGameDev
Posts: 7
Joined: Fri Mar 26, 2021 10:28 pm

Re: I cant delete the file on game

Post 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!
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: I cant delete the file on game

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
WaruGameDev
Posts: 7
Joined: Fri Mar 26, 2021 10:28 pm

Re: I cant delete the file on game

Post by WaruGameDev »

Butm if I delete the file.
How you create a new one?
or is automatic?
Best
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: I cant delete the file on game

Post by Joel »

Files are automatically created if they don't exist.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
WaruGameDev
Posts: 7
Joined: Fri Mar 26, 2021 10:28 pm

Re: I cant delete the file on game

Post 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
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: I cant delete the file on game

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply