Hello,
Im trying to do the following:
* unlock a container using cloud script for a players
* retrieve ItemIds of the items dropped in the container (container contains a drop table)
because I want to do some extra actions on the ItemIds only
my problem is the following: when I try to access GrantedItems from the response and get an item on a specified index I can't retrieve ItemId.
it throws an error and tells me to check my argument. it Also set it to null although I have ItemIds in response.
i'm accessing the ItemIds like this: unlockContainerBox.GrantedItems[0]["ItemId"];
I have the following Code:
handlers.unlockContainer = function (args, context) { var containerID = args.containerID; //unlock box var unlockContainerBox = server.UnlockContainerInstance ( { PlayFabId: currentPlayerId, ContainerItemInstanceId: containerID } ); var Item = unlockContainerBox.GrantedItems[0]["ItemId"]; return Item; }