question

nextdoorcs avatar image
nextdoorcs asked

Statistic "Aggregation method" is Bug??

We have option Maximum. Writes the "10" points Since the record "5" points "10" The point is not to be recorded due to higher. But "five" points will be recorded Another option is also not Like ex) sum

sdks
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 way statistics work is that the aggregation method determines how the statistic is updated for the player/character. With the aggregation method set to "Max" in the statistic definition (CreatePlayerStatisticDefinition or UpdatePlayerStatisticDefinition in the Admin API), the player's score will be updated to the newly submitted score if - and only if - the new score is higher than the old one. So if his score is 5 and 10 is submitted, it would become 10. But if it's 10 and 5 is submitted, it remains 5. Setting the aggregation method to "Sum" means that any value submitted will be added to the old one. So if the value in that case is 10 and 5 is submitted, the new value will be 15.

I just re-tested this in my own title, and confirmed that the behavior is as expected, but if you're seeing something else, can you please provide the Title ID, PlayFab ID, and the Statistic Name?

6 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.

nextdoorcs avatar image nextdoorcs commented ·

Aftert I set Max for Leaderboard, First sent value 5, Second send new value 10, but it returns 5.

title id : 4093

playfab id : 7F02858805427DC6

statistics : TopScoreMax

MAX Option (highest only)

1. 10 => 11 leaderboard recode succes ! (ok)

2. 11 => 9 leadberboard recode success (???)

0 Likes 0 ·
2.png (17.4 KiB)
3.png (17.3 KiB)
nextdoorcs avatar image nextdoorcs nextdoorcs commented ·

tic tok~~~

0 Likes 0 ·
brendan avatar image brendan nextdoorcs commented ·

Apologies for the delay on this - for some reason, I wasn't notified of your initial response. We're currently in the process of resolving an issue which is causing delays in statistic/leaderboard updates. It was intermittent previously, which is likely when you saw it the first time, but we currently have a more general delay for most titles. The fix for this is in final test, so we should be getting these caught up shortly. We'll update here as soon as we have more info.

0 Likes 0 ·
Show more comments

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.