I am trying to implement a generic class that i can throw on all my inventory items in the game and depending on the glimmersPrice and itemName it will determine which item is being purchased on playfab because the price amount and the itemName will match the PriceAmounts and Items that the PurchaseInventoryItems API requires. I am getting this error though:
Cannot implicitly convert type 'int' to 'System.Collections.Generic.List<PlayFab.EconomyModels.PurchasePriceAmount>' [Assembly-CSharp]csharp(CS0029)
using System.Collections; using System.Collections.Generic; using UnityEngine; using PlayFab; using PlayFab.ClientModels; using PlayFab.EconomyModels; public class ItemToBuy : MonoBehaviour { public int glimmersPrice; public string itemName; public void BuyItem2() { var request = new PurchaseInventoryItemsRequest { PriceAmounts = glimmersPrice; }; PlayFabEconomyAPI.PurchaseInventoryItems(request, OnPurchaseInventoryItemsSuccess, OnError); }
I had a class very similar to using economy v1 and it worked, but now that I am trying to use the new version of the economy I am running into issues. I have been refrencing the documontation alot but I have found it is not very in depth.