Google time ranking

Hi,

I would like to create a time ranking on google play. But, when I try to submit a time, it doesn’t work…

Here is my code:

myCategory = "the big number......." local minutes = math.floor( myData.results.bestTime / 60 ) local seconds = myData.results.bestTime % 60 local hours = 0 -- make it a string using string format. local timeDisplay = string.format( "%02d:%02d:%02d", hours ,minutes, seconds ) gameNetwork.request( "setHighScore", { localPlayerScore = { category=myCategory, value=timeDisplay }, } )

In my code, myData.results.bestTime is in seconds.

And they say that it should look like “34:17:30”.

Does someone know the format of the time I want to submit on google play rankings?

Thanks in advance

I think I found the solution on google play for developer website: it has to be in milliseconds.

Hi,

I’m still getting trouble with this time ranking as I don’t succeed in submitting values… Although all other rankings work properly, this one does not seem to accept my times (in milliseconds). This time ranking remains empty…

Here is my code:

local myTime = myData.results.bestTime\*1000 gameNetwork.request( "setHighScore", { localPlayerScore = { category="big number", value=tonumber(myTime) }, } )

Has anyone encountered this kind of issue? Any idea?

Thanks in advance

This might sound obvious, but have you made sure that the variable isn’t nil or 0, by printing:

print(myData.results.bestTime)

Thanks for your reply.

Yes, it’s not nil or 0. And there’s nothing wrong in my logcat…

I figured out I made a very very very stupid mistake… I entered in google play that I did not want scores higher than 0 instead of lower than 0…

Sorry for the disturbance

I think I found the solution on google play for developer website: it has to be in milliseconds.

Hi,

I’m still getting trouble with this time ranking as I don’t succeed in submitting values… Although all other rankings work properly, this one does not seem to accept my times (in milliseconds). This time ranking remains empty…

Here is my code:

local myTime = myData.results.bestTime\*1000 gameNetwork.request( "setHighScore", { localPlayerScore = { category="big number", value=tonumber(myTime) }, } )

Has anyone encountered this kind of issue? Any idea?

Thanks in advance

This might sound obvious, but have you made sure that the variable isn’t nil or 0, by printing:

print(myData.results.bestTime)

Thanks for your reply.

Yes, it’s not nil or 0. And there’s nothing wrong in my logcat…

I figured out I made a very very very stupid mistake… I entered in google play that I did not want scores higher than 0 instead of lower than 0…

Sorry for the disturbance