Hey all,
I have been using the Ice module by GrahamRanson and have run into a problem. At the end of the game, the score is saved. Then, in another menu, the lowest current score can be seen. Then only problem is that after a couple of hours of not playing the game, the values are set back to zero. Here is some of my code:
In the game I:
[lua]—Set up my Icebox—
require( “ice” )
local scores = ice:loadBox( “scores” )
—Saves the score—
scores:store( “best”, (scores:retrieve(“best”)))
scores:storeIfLower( “best”, (finalPTS))
scores:save()[/lua]
In the Scores menu I:
[lua]–load my Icebox
local scores = ice:loadBox( “scores” )
—Set up some vars—
if scores then
easyT = (scores:retrieve(“best”))
end
—Determine what the text should say—
if easyT == nil or easyT == 0 or easyT == 5000 then
easyTime.text = “—”
else
easyTime.text = (easyT)
end[/lua]
I have no idea what the problem could be. If you need more code I can probably dig it out… Any suggestions would be*
*Much appreciated,
J.K. [import]uid: 66117 topic_id: 18685 reply_id: 318685[/import]