Loading compressed save file doesn't work

Discussion and help for Easy Save 3
Post Reply
Levgre
Posts: 9
Joined: Mon Apr 06, 2020 5:49 pm

Loading compressed save file doesn't work

Post by Levgre »

Everything was working and loading fine, then I tried to switch to compress mode and now the saved content is null. Do I need to decompress the save file somehow (don't see a way to, I'm just using ES3.LoadInto), or change something else in settings (such as format, encryption, etc.)?

Thanks for any help
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Loading compressed save file doesn't work

Post by Joel »

Hi there,

Please could you show me the code you're using so I can take a look?

Also be aware that if you've previously saved data without compression enabled, you will need to delete that save data as Easy Save will be expecting compressed data.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Levgre
Posts: 9
Joined: Mon Apr 06, 2020 5:49 pm

Re: Loading compressed save file doesn't work

Post by Levgre »

I seem to have "fixed" it, by doing compression in the code rather than changing it in the ES3 settings window.


This was my old code (compression turned on in settings)

Code: Select all

public void SaveGame()
    {
    
        ES3.Save<PlayerSave>("PlayerSaveScript", PlayerSaveScript);
        NewGame = false;
    }

    public void LoadGame()
    {
        //PlayerSaveScript = ES3.Load("PlayerSaveScript", PlayerSaveScript);
        ES3.LoadInto("PlayerSaveScript", PlayerSaveScript);
     }
Here's my new code (compression not turned on in settings)

Code: Select all


public void SaveGame()
    {
        var settings = new ES3Settings(ES3.CompressionType.Gzip);
       
        ES3.Save<PlayerSave>("PlayerSaveScript", PlayerSaveScript, settings);
     
        NewGame = false;
    }
    public void LoadGame()
    {
        var settings = new ES3Settings(ES3.CompressionType.Gzip);
        ES3.LoadInto("PlayerSaveScript", PlayerSaveScript, settings);
       
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Loading compressed save file doesn't work

Post by Joel »

Hi there,

I'm still not able to replicate this at my end. Would you be able to private message me a basic project which replicates your issue?

Also just to check, are you using the latest version of Easy Save?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply