Hi,
I'm trying to run Consumeitem for items in a character inventory (not player inventory). I'm using the following code:
PlayFabClientAPI.ConsumeItem(new ConsumeItemRequest() { ConsumeCount = 1, ItemInstanceId = playFabInstanceID }, result => { //success code here }, error => { Debug.Log("Error reducing health:"); Debug.Log(error); });
However, I am getting an Item Not Found error -- even though I can see via a GetCharacterInventory() that the item is correct.
I discovered that this code does work if I try to run it on an item in the player inventory instead. Is there a way I can run Consumeitem for items in a character's inventory?! The documentation seems to suggest that this should work. :(
,
Hi,
I'm trying to use ConsumeItem, via the following code, for items in a Character's Inventory:
PlayFabClientAPI.ConsumeItem(new ConsumeItemRequest() { ConsumeCount = 1, ItemInstanceId = playFabInstanceID }, result => { //successful code here<br> }, error => { Debug.Log("Error reducing health:"); Debug.Log(error); });
However, I'm getting "Item not found" errors whenever I run this, even though a GetCharacterInventory() shows that the ID is correct. After much consternation, I discovered that this error ONLY happens for items in the Character Inventory, but it DOES work for items in the Player Inventory.
The documentation seems to suggest this should work for items in a Character Inventory. What should I be doing here?