Need Help

I want to create a High Score for this game.
Each fruit you slice gets 15points.

I’ve tried the codes but none of them seem to work.
I got one atm but score shows behind background image and it has a result of (WIN) as the score.

http://developer.anscamobile.com/code/samurai-fruit
this is the game i edited.

Below is one part of the game code I have.
[blockcode]
function setUpBackground()

local background = display.newImage(“bg.png”, true)
background.x = display.contentWidth / 2
background.y = display.contentHeight / 2

end

– score display

local scoreDisplay = ui.newLabel{
bounds = { display.contentWidth - 120, 10 + display.screenOriginY, 100, 24 }, – align label with right side of current screen
text = “0”,
textColor = { 255, 225, 102, 255 },
size = 110,
align = “right”
}

score = 0

scoreDisplay:setText( score )
scoreDisplay:setText( system.getInfo(“platformName”)
)
[/blockcode]

And I want it to post on Fient as the high score?

One more question that I can’t find the answer for.
If i wanted to add the in app-purchasing in the game.

And for a example: you pay $1 to start the score with 500points
and if the game is turned off, the 100points will not save for the user so he has to purchase again… am I able to do that?

Sorry if any confusing things I’ve wrote.

Thanks
Wahid [import]uid: 58887 topic_id: 10648 reply_id: 310648[/import]

Sorry typo

the 500points will not save for the user so he has to purchase again… am I able to do that?****** [import]uid: 58887 topic_id: 10648 reply_id: 38667[/import]

Hi whitestarand,

For saving a high score see the high score examples in the code exchange.

For OpenFeint see the OpenFeint API or read the step by step tutorial on http://Techority.com/

For In App Purchases you will also need to review the API, of course.

Yes, it could be done - however most users would not pay $1 for a score boost, especially if the boost is not permanent.

I would encourage you to learn a little more Lua before attempting to dissect the Samurai Fruit example; it is somewhat advanced.

Peach :slight_smile: [import]uid: 52491 topic_id: 10648 reply_id: 38692[/import]

Thanks for the quick reply!

I will try what you suggested and see how i’ll go…! :slight_smile:

Thank you heaps again.
Wahid [import]uid: 58887 topic_id: 10648 reply_id: 38731[/import]

I can’t get the code to work.

Is anyone able to edit the game.
http://developer.anscamobile.com/code/samurai-fruit
add a highscore and upload the folder to work for android devices.
Thanks
Wahid [import]uid: 58887 topic_id: 10648 reply_id: 38767[/import]