Hello,
I have been following this tutorial: "http://shootertutorial.com/2016/01/30/adding-playfab-online-leaderboards/" and have found it very useful. Only some parts of it seem outdated but I am not sure how outdated. My current problem is I am attempting to use Cloud Script for writing stats to a player when they get a high score in a game.
What I can do:
I have downloaded the example project and in both mine and it, I can login a user without issues and call the generic "helloWorld" function via the ExecuteCloudScript node. The response I get back from the "helloWorld" function is the proper message, extracted from the messageValue.
Concern:
1. In the tutorial I am referencing, it suggest using a GetCloudURL, but I don't think this function exists anymore, so is it irrelevant now and unconnected to my issues?
2. I was told in the tutorial that all I need is the Client PlayFab plugin for UE4 blueprints, but do I need to do anything in the PlayFab dev site? I created a CloudScript that handles the UpdateUserStatistics, so I do not need to allow Clients to post statistics, correct?
Where my problems are:
1. I have been looking through a lot of this section and have found out some cool things, such as using Cloud Scripts for individual players, but I am not entirely sure how this works. When I attempt to pass in the arguments to my function which takes in a float and a string (highscore value, gametype), there should technically be two arguments (e.g. "55, chess") but it only accepts one and in number form (e.g. "55"). Perhaps my Cloud Script code is outdated? I took it directly from the tutorial and tweaked the variables, as I need a float and string structure.
2. I have made sure my CloudScript uses the same variable names as the ones I am setting the JSON Object's Number and String Fields. I have also made sure that my CloudScript function's name is properly being delivered into the function name param when I Make the ClientExecuteCloudScriptRequest. Even though the ExecuteCloudScript node returns false on "Has Error" and trigger's its On Success event, my error code is: 1065353216. The ExecuteCloudScript node has no function name upon the success event and the messageValue is empty, which tells me my Cloud Script is failing to set the player's stats. Any thoughts on this?
3. It is my understanding from the tutorial that to make leader boards work, all one has to do is generate some stats by calling UpdateUserStatistics, which I do in my CloudScript which is executed via bp node, and then they can call the GetLeaderboard node using that string field on the stats, and that will get all players with those stats and automatically organize them? If so, then that is pretty cool. Will it auto generate a leaderboard on the PlayFab dev sit with that name then, or do I need to generate that as well?
Any help is appreciated. Thanks,
Jacob