question

miquelroan avatar image
miquelroan asked

UpdatePlayerStatistics on PHP SDK

Hello, I have been working with the PHP SDK, and I have been able to make it work on a couple requests.

Unfortunatelly, I'm not being able to call UpdatePlayerStatistics properly.

No matter what arguments I pass, I always get "Invalid input parameters".


Here's an example of my call:

{'PlayFabId':'hidden',
  'titleId':'hidden',
  'Statistics':[  {'StatisticName' : 'Latitud', 'Value' :0},
                  {'StatisticName' : 'Longitud', 'Value' :0}]}

I've tried to dive into de SDK code as far as I know to try to solve this issue.

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

Sarah Zhang avatar image Sarah Zhang commented ·

Have you checked the errorDetails of this errorMessage ("Invalid input parameters")?

0 Likes 0 ·
miquelroan avatar image miquelroan Sarah Zhang commented ·

yes, the details are:

"The PlayFabId field is required."

"The Statistics field is required."
0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang miquelroan commented ·

Thanks for replying. We will test the method in PHP SDK to investigate it.

1 Like 1 ·

1 Answer

·
miquelroan avatar image
miquelroan answered

I've been able to fix this by replacing " (double comma) for ' (single comma) for keys and values

10 |1200

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

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.