Hi, I know I asked this already but, it seems I still don’t know how to save in a way I can understand. Ok so what I want is to save a score only one.
This is a code sample from peach
[code]local background = display.newImage (“background.png”)
score = require (“score”)
local border = 5
local scoreInfo = score.getInfo()
score.init({
x = 40,
y = 5}
)
score.setScore(0)
local function addtoit (event)
if event.phase == “ended” then
score.setScore (score.getScore()+107)
end
end
background:addEventListener(“touch”, addtoit) [/code]
Ok In the code above demonstrates how to add score. Now I want to know how to save the score when I exit the app, or touching a button to save a score if one is greater than the other.
So basically save a score only if the score is greater.
Help is appreciated thanks
[import]uid: 17058 topic_id: 21037 reply_id: 321037[/import]