Please clarify OpenFeint documentation

The docs say:


openfeint.setHighScore( leaderboardId, score )
Deprecated. Use setHighScore(leaderboardid=id, score=high_score[, displayText=display_string]) form instead.

Yet they also say:

openfeint.setHighScore( { leaderboardID=ID, score=highScore [, displayText=displayString] } )

Files won’t compile using the [lua]setHighScore(leaderboardid=id, score=high_score[, displayText=display_string]) [/lua].

You need the braces to make the input a table, right?

But I’m having no luck getting OF to recognize setHighScore unless I use the old deprecated format.

And shouldn’t it be [lua]leaderboardId[/lua] and not [lua]leaderboardid[/lua]?
Also, are single and double quotes the same for Lua? [import]uid: 1560 topic_id: 2684 reply_id: 302684[/import]

also, the syntax for
openfeint.unlockAchievement( achievementId )
doesn’t seem to work

i’ve tried

openfeint.unlockAchievement( myAchievementNumber )
openfeint.unlockAchievement( ‘myAchievementNumber’ )
openfeint.unlockAchievement( “myAchievementNumber” )

and all three generate a crash (iPhone OS 4.1)
[import]uid: 1560 topic_id: 2684 reply_id: 7889[/import]

Updated the docs. I’ll look into the unlockAchievement issue. [import]uid: 54 topic_id: 2684 reply_id: 7895[/import]

Oops. OpenFeint changed their API in 2.7 and we failed to test this case. We’ll fix this ASAP. [import]uid: 54 topic_id: 2684 reply_id: 7896[/import]

ok, thanks. please post when this has been addressed. it took like a dozen builds trying out variations of the API format before i had to accept that something other that my lua code wasn’t working. [import]uid: 1560 topic_id: 2684 reply_id: 8024[/import]

Any update? I’d like to create a test achievement on this silly little project I’m working on, just to know that I can and to reference it once I’ve learned enough to make a proper game.

Thanks :slight_smile:
Peach. [import]uid: 10144 topic_id: 2684 reply_id: 8583[/import]

The fix is checked in and it’ll be in the next build. How critical is it to you to get this into your hands? [import]uid: 54 topic_id: 2684 reply_id: 8588[/import]

I’m about three weeks from being able to submit my game. If the next build drops before then, that’d be nice as I’d like to include achievements. [import]uid: 1560 topic_id: 2684 reply_id: 8592[/import]

Nice to see such a fast response; obviously I’m still learning and it isn’t a huge thing to me yet, nor will it be for a few weeks at the very, VERY least.

*backs away to leave people actually making games to post* :stuck_out_tongue: [import]uid: 10144 topic_id: 2684 reply_id: 8607[/import]

Hi,

We have pushed a fix for this OpenFeint issue to our device build servers. As this fix is only on the server-side, you do not need to download anything to “get it”. Just rebuild your application for device and it will work as expected. Thanks for your patience!

Tim [import]uid: 8196 topic_id: 2684 reply_id: 10631[/import]

This won’t alter the functioning of the deprecated format will it? I have an app awaiting approval with the old format… [import]uid: 1560 topic_id: 2684 reply_id: 10638[/import]

Update 11/16/10: OF is working as indicated in the docs. openfeint.setHighScore( { leaderboardID=lbID, score=points } ) worked for me when I got the values from the function and put them into local variables. This may be unnecessary but it’s working for me now.
Have you verified that the fix works? I just tried a build with the recommended syntax and OF would not recognize a high score. But using the deprecated format, I was able to set a high score. Tested on iPhone 4, 11/10.

[lua]function setHighScore( lbID, points )
if not isOFSupported then return end

–THIS WORKS. IT’S THE DEPRECATED FORMAT.
openfeint.setHighScore(lbID, points)

–THIS DOES NOT WORK. IT’S THE RECOMMENDED SYNTAX. lbID is the board ID in quotes. points is the score number.
openfeint.setHighScore( { leaderboardID=lbID, score=points } )
end[/lua] [import]uid: 1560 topic_id: 2684 reply_id: 10743[/import]