question

robert avatar image
robert asked

Server.UpdatePlayerStatistics ignoring ForceUpdate

As the topic says, UpdatePlayerStatistics ForceUpdate parameter is ignored (tested on a statistics with aggregation method set to Sum). Although ForceUpdate = true the value is added instead of set.

Additionally the Try It method located here:

https://api.playfab.com/documentation/server/method/UpdatePlayerStatistics

can't be used as there is no Value field

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

It's working fine in my testing. Can you provide the specific Title ID, PlayFab ID, and the specific parameter values you're passing in?

For the Try It functionality, it is always at the level of the parameters for the function itself. Where, as in this case, one of those parameters is complex, you need to enter it in JSON form. So, you enter all statistics in the Statistics parameter, exactly as you would when making the call via Postman.

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.

robert avatar image robert commented ·

Everything fine, we unfortunately added the ForceUpdate parameter to the statistics parameter itself (e.g. {StatisticsName, Value, ForceUpdate}) and not to the request parameter itself. Also the TryIt page is working fine.

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.