question

jlanis86 avatar image
jlanis86 asked

How to get the current version # of a leaderboard?

Is there a way to query what the current version NUMBER of a particular leaderboard is? I am trying to access one revision before the current version. I am currently using OnGetLeaderboard without specifying a version number, and then retrieving the version number from the result of the query (which gives me the current version number...and then I simply subtract 1). But it seems pretty inefficient/sloppy.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

The alternative would be to use Server/GetPlayerStatisticVersions to get the info on all versions of the statistic, so that you can query the older ones.

8 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

stupidwizard19391 avatar image stupidwizard19391 commented ·

I can get PlayerStatisticVersions. But if I use "daily reset" statistic, after 1 year (365 days), the result will be too big. I think it is a problem!

0 Likes 0 ·
brendan avatar image brendan stupidwizard19391 commented ·

I don't follow. The version is a 32 bit int. Even using daily reset, you're not going to run out of room for the version number.

0 Likes 0 ·
stupidwizard19391 avatar image stupidwizard19391 brendan commented ·

I know, but I think the json result is problem. I tested with data which contains 200 days, It's about 43kb. I only want to know the current version of the statistic (to show daily leaderboard), but I must request and receive a lot of data which I don't use T_T .

0 Likes 0 ·
Show more comments
Show more comments
Oriol avatar image Oriol commented ·

@Brendan Sorry for bringing this thread back to life, but I am using GetLeaderboard to get the current version of the Leaderboard and it is giving me yesterday's value in some cases, for example at 2020-03-20T00:01:29 UTC, and it is giving me limit errors, because I use it in the cloud script to retrieve yesterday's leaderboard (so I subtract 1 from the value it returns). Maybe it is because the leaderboard change is being made and it has not finished? Is there any other way to get this value? Thanks

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.