[SOLVED] Simple save/load game system using .txt files?

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
green_blaze
Prole
Posts: 1
Joined: Fri Feb 08, 2019 8:51 am

[SOLVED] Simple save/load game system using .txt files?

Post by green_blaze »

Example code:
Last edited by green_blaze on Fri Feb 08, 2019 2:24 pm, edited 5 times in total.
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Simple save/load game system using .txt files?

Post by grump »

What is table.show? Why do you call saveGame() when you want to load a game?

To get better answers, post a love file with the entire code.

Your code will only work in Windows (because of mkdir Games). There's also the danger that the Games directory is created in a random location, if you didn't make sure the working directory is what you want it to be. Better use love.filesystem to avoid all of these problems.

BTW, there are several ready to use solutions available for serialization, so you don't need to reinvent the wheel. You can find some of them here.

Edit: deleting your question once you got an answer is fucking rude.
Post Reply

Who is online

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