TL;DR 1) I can't get AddVirtualCurrency to work. Maybe it's because I originally named my currency "gp" instead of "GP"? 2) "Amount" may be "AmountValue", looking at the error return?
___________________________________________
I was testing a simple function for adding currency, and realized when testing the server returns (below). I realized the message says "AmountValue" rather than "Amount" on the doc here:
https://api.playfab.com/documentation/Server/method/AddUserVirtualCurrency
I also realized that the currency now says "UPPERCASE" 2 letters. I can't change it -- when I first added it about 8 months ago, it was "gp". Would this be a reason of fail? The error is too generic.
The request from user's profile:
{ "PlayFabId": "E123456789", "VirtualCurrency": "GP", "Amount": 100 }
I've tried both "gp" and "GP" (says "gp" in my dashboard, but also says uppercase)
The error is pointing here:
var addUserVirtualCurrencyResult = server.AddUserVirtualCurrency(addGpRequest);
{ "FunctionResult": null, "Logs": [ { "Level": "Debug", "Message": "{\"PlayFabId\":\"E123456789\",\"VirtualCurrency\":\"GP\",\"AmountValue\":50}", "Data": null }, { "Level": "Error", "Message": "PlayFab API request error", "Data": [ ............. ], "ExecutionTimeSeconds": 0.0316734, "MemoryConsumedBytes": 28256, "APIRequestsIssued": 1, "HttpRequestsIssued": 0, "Error": { "Error": "CloudScriptAPIRequestError", "Message": "The script called a PlayFab API, which returned an error. See the Error logs for details.", "StackTrace": "Error\n at handlers.addGold (77C6-CloudScript.js:30:47)" } }