Page 1 of 1

Hi, please help my about file manipulation

Posted: Thu Dec 03, 2020 4:10 pm
by ThibsLeNoob
Hello,

the love.filesystem reads or writes everything at the same time,
how can I write and retrieve data in 2 different variables with a single file?
thank you in advance.

-Thibs-

Re: Hi, please help my about file manipulation

Posted: Fri Dec 04, 2020 10:42 pm
by darkfrei
I make the file savefile.lua and save here the global table.
Your save file can be such as

Code: Select all

return {1, 2, {a="1, b=2"}}
So you can save any amount of any variables just to one table.

http://lua-users.org/wiki/SaveTableToFile
https://github.com/gvx/Ser
https://love2d.org/forums/viewtopic.php?t=81799