How To submit my time of win game in game center in ios
Asked Answered
C

1

2

how to post/Submit my time in game center in iOS acutely i am complete my game with in 2 mint and Submit my time game center

02.00 and acutely leaderboard save time like this 0.00.02 i want submit my time look like in leaderboard 0.02.00

enter image description here

currentScore=02.22;

[[GameCenterManager sharedManager] saveAndReportScore:currentScore leaderboard:leaderboardNameID
                                                    sortOrder:GameCenterSortOrderLowToHigh];
Cicely answered 8/5, 2015 at 12:45 Comment(4)
A wild guess: the server expects you to send the number of seconds, check the API docs to clear it out.Eurythmics
acceding to you i am convert my time in number of secondsCicely
Well then, maybe a look at your code would be helpful to understand the problem.Eurythmics
Don't add the code with new comments, edit the question instead. Add more related code, the single assignment operation is hardly useful to understand the whole process that you have created.Eurythmics
L
2

The score parameter is an integer, so you should be tracking the number of seconds as the score, not the number of minutes:

int score = 2 * 60 + 22;   // 142 seconds = 2m22s

Reference

Lonlona answered 8/5, 2015 at 13:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.