question

scott-4 avatar image
scott-4 asked

UnlockContainerItem - "missing container item" error,

Hello, I'm trying to figure out how to grant my player the contents of a container I have created in my catalog. This is how I set up the container and it's contents


This is the code I'm running to try and grant the contents to my player...

private void UnlockContainer()
    {
        var request = new UnlockContainerItemRequest
        {
            ContainerItemId = "chest_Chippy"
        };


        PlayFabClientAPI.UnlockContainerItem(request, OnUnlockContainerSuccess, OnUnlockContainerFail);
    }

Which seems straightforward, but when I run this in game, I get an error message of...

"Missing container item"

when I'm expecting the 'chippy' catalog to be the granted item to the player.

Any thoughts why I'm getting this error, instead of what I'm expecting?

Thanks!

,
In-Game Economy
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

This error indicates that the target container is not in the target player’s Inventory. I just did a test, and it works fine when my inventory has the container I want to unlock. Please check player’s inventory to see if it has the ‘chest_Chippy’ container.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.