question

pdaz avatar image
pdaz asked

Invalid input parameters when getting Statistics

PlayFabClientAPI.GetPlayerStatistics() started returning error with code InvalidParams 30 minutes ago.

I changed nothing in my code, no player can login because of this error, please fix asap.

Title Id 1941.

List<string> pstat = new List<string>()
		{
			"totalbombtime",
			"totalcoins",
			"totaldistance",
			"totalraces",
			"totaltime",
			"totalturbo",
			"totalwins",
			"totalcop",
			"totalbandit",
			"totalGoals",
			"totalx2",
			"totalturbo",
            "totaldrift",
            "totalundefined",
			"monthbombtime",
			"monthcoins",
			"monthdistance",
			"monthraces",
			"monthtime",
			"monthwins",
			"monthcop",
			"monthbandit",
			"monthGoals",
            "monthdrift",
            "monthundefined"
		};
		GetPlayerStatisticsRequest getpstat = new GetPlayerStatisticsRequest()
		{
			StatisticNames = pstat
		};
		PlayFabClientAPI.GetPlayerStatistics(getpstat,(pstatResult) => 
			{
				progressPlayer += 0.2f;
				foreach(StatisticValue st in pstatResult.Statistics)
				{
					ObscuredPrefs.SetInt(st.StatisticName, st.Value);
				}
			}, OnPlayfabError);
Leaderboards and Statistics
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.

pdaz avatar image pdaz commented ·

I reproduced it in Postman and can't see any pattern in error.

If I try to get all statistics it is InvalidParams.

If I try to get all statistics without totalturbo it is OK.

If I try to get only totalturbo it is OK.

If I try to get totalturbo with some other statistics it is sometimes InvalidParams.

Server/GetPlayerStatistics is working just fine.

0 Likes 0 ·

1 Answer

·
pfnathan avatar image
pfnathan answered

We have rolled out an API check to see if there's a duplicated item which will return an error. Your title with "totalturbo" was one of them. We have rolled back but it will take about an hour.

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.

pfnathan avatar image pfnathan ♦ commented ·

We have rolled out an API check to see if there's a duplicated item which will return an error. Your title with "totalturbo" was one of them. We now have rolled back.

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.