Using files intstead of tables to save game data

Hi, I need some advice on how to use text files(instead of tables) to save game data (especially on android and ios).
I tried it and it works well on windows but it doesn’t on Android. What could be the problem?

Thanks.

On Android and iOS only some directories are writable. To get path to them you can use my extension https://github.com/Lerg/extension-directories you need documents directory.
There you can create files.

5 Likes

You must make sure to either use a path provided by the extension @sergey.lerg suggested or use the path you get from a call to sys.get_save_file().

4 Likes

Thanks a lot.

Am I to create the documents directory myself and if so how?

That directory should already be available.

Still having the same issues on android. Here’s the log file.
log.txt (488 Bytes)

What is the error?

It doesn’t save the data.
This is the only error in the log:

ERROR:PROFILER: Could not open /proc/stat

How do you know it doesn’t?

Profiler error is to be ignored.

Thanks for the help.