question

eswitzer07 avatar image
eswitzer07 asked

Unreal Blueprint: ClientGetPlayerStatisticsRequest Forces StatisticNameVersion Input

Per the documentation (https://api.playfab.com/documentation/client/method/GetPlayerStatistics) It seems like this code only should have optional inputs for StatisticName and StatisticNameVersions - However the blueprint node requires input for the Versions array as you can see here:

Error: The current value of the ' Statistic Name Versions ' pin is invalid: Array inputs (like 'Statistic Name Versions') must have an input wired into them (try connecting a MakeArray node).

Using 0 as a field value with the name of "StatisticNameVersions" as an array input results in a null output: http://puu.sh/zBD05/4dfdc854b0.png

Is this a bug? Whats the proper way to get player statistics on client.

Ive tried getting it using a return on a cloud function, but the formatting from that is far from ideal.

unreal
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

·
1807605288 avatar image
1807605288 answered

[UPDATE]

Montana Tuska verified that you can just drag an empty list constructor node to satisfy your blueprint. The other cautionary warnings I have in my original post seem to have been over-cautious and unneccessary.

[ORIGINAL]

Apologies, this might be a bug, but I can't verify at the moment.

I am currently trying to reinstall Unreal Engine on my computer, so I will not be able to give you a quick answer.

Here is an option you can try:

From that input, drag out a new blueprint-node to provide an empty list to that input.

I examined our server code, and there's a problem you may face next/soon: You may need to provide explicit statistic names that you want to use for now. There's an issue where if you provide an empty list (the only thing you CAN do in Unreal), then you get zero statistics, instead of all of them.

I've filed a bug on this latter issue, but you will be affected until it's fixed, and I have no ETA.

I ... think the Statistic Name field is a comma-separated set of strings... or maybe semicolon-separated.

Apologies for sloppiness of my answers, it's been a while since I've focused on Unreal.

I am re-installing Unreal now, and I will try to answer any follow-up questions with more clarity.

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.

Montana Tuska avatar image Montana Tuska commented ·

I just ran through it, and you can set it up without actually filling in the array.

You can see in the following picture, I make an array and just send no data within.(It defaults with a single pin for the array, just right click that pin and click remove pin at the bottom)

0 Likes 0 ·
capture.png (189.1 KiB)
1807605288 avatar image 1807605288 ♦ Montana Tuska commented ·

Yes, this is pretty much exactly what I was hoping would work. Thanks for verifying it!

0 Likes 0 ·
eswitzer07 avatar image eswitzer07 Montana Tuska commented ·

Awesome, thank you. This is perfect

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.