question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

Player Statistics must be a strong or array type with a max length of 25

When updating player statistics, I'm getting this error:

Player Statistics must be a strong or array type with a max length of 25

Is there a particular reason it is implemented this way? A workaround is for me just to split the updates every 25 stats I want to update, but it feels a lot cleaner if I could just update them with one call.

I already upgraded to the paid statistics plan so I have a limit of 100 statistics.

apis
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

Can you help us understand why you're trying to update that many statistics all at once? The limit upgrade provides you with an increased total number of statistics, but the rate at which statistics may be updated does not change, as that is a significant driver of cost in the service overall. We try to keep costs down as much as possible, so that we don't have to increase our pricing.

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.

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Understood - thanks for the context. This only happens occasionally, when I am setting the default values of statistics for a player when they log on for the first time. I suppose I could do two things: 1) omit any statistic updates that would update to a value of 0, since I can assume PlayFab's default value would be 0. 2) split any statistic updates beyond 25 after that. Most likely I won't need 2, since most default values are 0. (for now at least)

Edit: Actually, if I don't update a value to 0, then I try to fetch it later, can I rely on it to be 0? Just want to clarify.

0 Likes 0 ·
brendan avatar image brendan Brent Batas (Lisk) commented ·

If you've never set the statistic for a player, it won't exist on that player's profile. So it's fairly trivial to call that 0 when you query all the player's stats.

1 Like 1 ·

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.