i need to store data (score) and need to retrieve it when i open the next time. I followed peach’s tutorial, but i could not understand it properly.
Can some one help me where i am wrong .
_G.level1starscollected=3 --this is the data i need to store
saveit.save()
–Here is the saveit.lua that i used from peach’s tutorial :
module(…, package.seeall)
function save( event )
local path = system.pathForFile( “ourdata.txt”, system.DocumentsDirectory )
local file = io.open( path, “w+b” )
file:write( _G.level1starscollected)
io.close( file )
end
am i missing some code.?
Please help.
Thank you. [import]uid: 76873 topic_id: 17772 reply_id: 317772[/import]

