question

robert avatar image
robert asked

StatisticValueAggregationOverflow

We have a few players who have played more than 10,000 games, in every game the player gets up to 200,000 of score points. We aggregate this into a statistics value but recently receiving:

>> The resulting statistic value after aggregation was outside of the valid 32 bit integer range.

Is there any way to handle keys as 64bit values? Are there any other 32bit value limitations?

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

I'm not sure what you mean by "other 32bit value limitations". The limit of a 32bit value is specifically that - what fits in 32 bits. There aren't any other limitations.

The statistics are 32bit, for compatibility across all the languages and platforms we support. There is no option for 64bit statistic values right now (though we do want to add this in a future update). You'd need to either store the value as a compound (where the high order bits and low order bits are used together as a math function to determine the actual score), or else restrict the values that can be written in the call.

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

robert avatar image robert commented ·

>>I'm not sure what you mean by "other 32bit value limitations". The limit of a 32bit value is specifically that - what fits in 32 bits. There aren't any other limitations.

Thanks for the 32 bit explanation ;) No, what we want to know is, which other playfab values/keys, e.g. amount of virtual currency are limited to 32bit. Without knowing the actual datatype used to store such values we might run into such troubles again in future.

>> You'd need to either store the value as a compound (where the high order bits and low order bits are used together as a math function to determine the actual score), or else restrict the values that can be written in the call.

I figured this was going to be the answer. Unfortunately its a bit late now and requires a lot of additional work to change to a different value format by trying to keep everything as compatible as possible.

0 Likes 0 ·
brendan avatar image brendan robert commented ·

The Int values that can be sent in client calls are Int32 values (so, VC and stats), for compatibility with all languages and devices.

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.