Save game stopped working on Android

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Normero
Prole
Posts: 2
Joined: Fri Mar 24, 2017 6:19 pm

Save game stopped working on Android

Post 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.
User avatar
Macsek
Prole
Posts: 11
Joined: Sat May 07, 2016 3:25 pm

Re: Save game stopped working on Android

Post 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.
Normero
Prole
Posts: 2
Joined: Fri Mar 24, 2017 6:19 pm

Re: Save game stopped working on Android

Post by Normero »

Thanks for the link, that worked!

Cheers
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 49 guests