Very basic error involving Binser
Posted: Thu Feb 15, 2018 1:40 pm
This is driving me a little mad. I post this here because due to the very basic nature of my test code it is likely to be a formatting issue than a misuse of Binser. To top it off no one seemed to have that issue. Based on my humble experience it must be something very stupid that I'm missing but yet it escapes me. thanks for taking the time to review this.
Love is returning this error when i try to load a save file
This is the test code.
And this is the content of the save file
What am i doing wrong? It should be a straightforward process. Thanks folks.
Love is returning this error when i try to load a save file
This is the test code.
Code: Select all
binser = require "includes/binser"
local player = {}
function love.load()
if love.filesystem.exists( 'Save.lua' ) then
player = binser.d(love.filesystem.load('Save.lua'))
else
player[1] = "foo"
player[2] = "bar"
end
end
-- etc. etc.
function love.quit()
love.filesystem.write( 'Save.lua', binser.s(player) )
end
What am i doing wrong? It should be a straightforward process. Thanks folks.