how to submit score as a time ?

Hi All,

I have tested to submit a score in a time format not integer but when i open the leaderboard I got my score show like this format 0:03  whereas  when i created the leaderboard in gpgs it shows the format should be 00:00:00 ?any idea why i am seeing the time like that…

do you i need to format the counter before i send it to gpgs ?

Thanks

Abdul

anyone faced this issue??.. I don’t know it is  normal or something wrong ?

all the examples that I saw are about a score in integer format. nothing in time or currency …

Regards

Abdul

I’ve never tried this, but looking at the GPGS setup, you can select time as an option.  I presume it takes an interger value of the elapsed number of seconds.  It will then format it into H:M:S.  It may not give you an hour until scores  break 60 minutes.

Rob

Rob,

i am sending the score as seconds(integer) but i don’t  get right formatting although i got the correct winner .

when I send 75 seconds which suppose to be in this format 00:01:15 --> i got 0.08 in gpgs leaderboard.

i dont understand that ?

Abdul

Maybe you could find an answer on a Google forum or StackOverflow. 

Rob

no luck so far… I posted it a question in StackOverflow…

I found this in Google play game service Docs…

For time, the score represents elapsed time in milliseconds

So I will try this tonight and let you know the result :).  I will multiply the score by 1000 before sending it.

Regards

Abdul

Then that sounds like the answer. 

Good luck!

Rob

:)  :)  :)  :slight_smile:

issue is resolved… as mentioned, you have to convert the seconds to milliseconds before submitting the score…

score = score x1000

Thanks Rob for time and advice.

Regards

Abdul

anyone faced this issue??.. I don’t know it is  normal or something wrong ?

all the examples that I saw are about a score in integer format. nothing in time or currency …

Regards

Abdul

I’ve never tried this, but looking at the GPGS setup, you can select time as an option.  I presume it takes an interger value of the elapsed number of seconds.  It will then format it into H:M:S.  It may not give you an hour until scores  break 60 minutes.

Rob

Rob,

i am sending the score as seconds(integer) but i don’t  get right formatting although i got the correct winner .

when I send 75 seconds which suppose to be in this format 00:01:15 --> i got 0.08 in gpgs leaderboard.

i dont understand that ?

Abdul

Maybe you could find an answer on a Google forum or StackOverflow. 

Rob

no luck so far… I posted it a question in StackOverflow…

I found this in Google play game service Docs…

For time, the score represents elapsed time in milliseconds

So I will try this tonight and let you know the result :).  I will multiply the score by 1000 before sending it.

Regards

Abdul

Then that sounds like the answer. 

Good luck!

Rob

:)  :)  :)  :slight_smile:

issue is resolved… as mentioned, you have to convert the seconds to milliseconds before submitting the score…

score = score x1000

Thanks Rob for time and advice.

Regards

Abdul