Page 1 of 1

Save game stopped working on Android

Posted: Fri Mar 24, 2017 6:27 pm
by Normero
Hello,

I'm close to releasing a game for Android on the Play Store, however today my save game stopped working. It still works on PC. It used to work on Android until today.

Perhaps it's because of an Android update, or am I missing something?

These are the relevant parts of my code:

Code: Select all

loadedLevel = love.filesystem.read('currentLevel.txt')
    if type(loadedLevel) == 'string' then
        currentLevel = tonumber(loadedLevel)
    else
        currentLevel = 1
    end
    

Code: Select all

love.filesystem.write('currentLevel.txt', currentLevel)

Code: Select all

function love.conf(t)
    t.externalstorage = true
    t.identity = "ampere"
end
Any ideas?

Thanks!

PS. I searched the forums, found some topic, but none of them had an answer to the problem.

Re: Save game stopped working on Android

Posted: Sun Mar 26, 2017 7:17 pm
by Macsek
There is a solution on the bitbucket issue tracker.

https://bitbucket.org/MartinFelis/love- ... -android-6

Modify the source as described in the last message and it should work.

Re: Save game stopped working on Android

Posted: Tue Mar 28, 2017 6:18 pm
by Normero
Thanks for the link, that worked!

Cheers