Using files intstead of tables to save game data

#1

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.

0 Likes

#2

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

#3

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

#4

Thanks a lot.

0 Likes

#5

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

0 Likes

#6

That directory should already be available.

0 Likes

#7

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

0 Likes

#8

What is the error?

0 Likes

#9

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

ERROR:PROFILER: Could not open /proc/stat

0 Likes

#10

How do you know it doesn’t?

Profiler error is to be ignored.

0 Likes

#11

Thanks for the help.

0 Likes