[SOLVED] Simple save/load game system using .txt files?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 1
- Joined: Fri Feb 08, 2019 8:51 am
[SOLVED] Simple save/load game system using .txt files?
Example code:
Last edited by green_blaze on Fri Feb 08, 2019 2:24 pm, edited 5 times in total.
Re: Simple save/load game system using .txt files?
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.
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.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests