question

brendan avatar image
brendan asked

Versions for updating statistics

Question from a developer:

When updating statistics, what should we use for the Version the first time versus subsequent times? If it's the first time, should the Version be set to null or zero or leave it as undefined? On subsequent times, should a previous Version value be used in the Update call?

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

To be clear, the version of a statistic is only updated on the reset interval or when you explicitly version it via the Game Manager or API call. Setting the statistic for a player does not change the version. When setting a statistic, you can leave the Version parameter out of the call if you want to write to the current version. The only time you would set it is if you want to make sure you're writing to the version that was active when the player started a game session or level, though if that session or level takes a long time, this could result in a failure due to the statistic no longer being write-able.

1 comment
10 |1200

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

Daniel Wynne avatar image Daniel Wynne commented ·

How long does it take for a statistic to become no longer write-able?

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.