I have a problem with the API. I don't know how to use AddUserVirtualCurrencyAsync correctly.
I get these error messages:
Error CS1503: Argument 2: cannot convert from 'method group' to 'object'
Error CS1503: Argument 3: cannot convert from 'method group' to 'Dictionary<string, string>'
What is wrong?
I want that a user can add gold coins(virtual currency) to his PlayFab account. In addition, I need to find out what the user's current amount of gold coins is when he starts the game. How can I get the current amount of gold coins from PlayFab when I start the game?
AddCurrency(); void AddCurrency() { AddUserVirtualCurrencyRequest request = new AddUserVirtualCurrencyRequest(); request.VirtualCurrency = "CU"; //put your virtual currency code here request.Amount = 100; //put the amount in here PlayFabClientAPI.AddUserVirtualCurrencyAsync(request, _OnAddCurrencyResult, _OnPlayFabError); } void _OnAddCurrencyResult(ModifyUserVirtualCurrencyResult _thisResult) { //Do all your successful handling in here Console.WriteLine("User has a current balance of: " + _thisResult.Balance + " (" + _thisResult.VirtualCurrency + ") after this change: " + _thisResult.BalanceChange); } void _OnPlayFabError(PlayFabError _thisErrorResult) { //Do all your error handling in here. Console.WriteLine("Got an error: " + _thisErrorResult.ErrorMessage); }