question

Brendon Sapacz avatar image
Brendon Sapacz asked

How do I get character inventory data from another player's character?

I am trying to get character inventory data from another player. Whenever I call GetCharacterInventory on the client, I always get the error: "A character does not exist with the specified ID" even though I know I am passing the correct Id! The function doesn't allow me to specify a PlayFabId, so I'm assuming it just defaults to the callers PlayFabId. Is there a workaround for this?

Character DataCharacters
1 comment
10 |1200

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

Brendon Sapacz avatar image Brendon Sapacz commented ·

I should also note that this is in UE4 using the C++ SDK. I would return data from the server but function returns from cloudscript are not working!

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Client/GetCharacterInventory is designed for a player to query the inventory of characters belonging to his player account. If you want to get the character for an arbitrary player in the service, you would need to use the Server API call (https://api.playfab.com/documentation/server/method/GetCharacterInventory), potentially via Cloud Script.

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.