Can't Make A Save File
Posted: Fri Jun 30, 2017 10:31 pm
Hey there, I need some help on making a save file on a Love2D game.
Here is my code below:
Now don't ask me why I chose '.klopman' as the extension, but can you help me fix it?
Here is my code below:
Code: Select all
local data
local quit = true
function love.load()
cmd = require('require.lovecmd')
if not love.filesystem.exists('sav.klopman') then
data = {}
print('Oh! Hello there. I must have been expecting you.')
else
data = love.filesystem.load('sav.klopman')
print('Ah, welcome back, dear player. Ready to continue playing?')
end
end
function love.quit()
if quit then
print('Are you sure you want to save before quitting?')
quit = false
else
io.write('sav.klopman')
return quit
end
return true
end