Hey!
I've been having an issue with getting ItemInstanceId from the result of GrantItemsToUser call in cloudscript. I can not get it to return anything but Null - even though it is definitely granting the item to the user. Honestly, I'm betting it's just a simple JavaScript error, but I'm not well versed in JavaScript enough to figure it out. Thank you for your help!
var pull = server.GrantItemsToUser({ "PlayFabId": currentPlayerId, "ItemIds": [lastId] }); var results = pull.ItemGrantResults; var instId = results.ItemInstanceId; return { message: instId };,
Hey!
I've been having an issue with getting the ItemInstanceId from the result of GrantItemToUser in cloudscript - no matter what I try it keeps returning Null, even though it's most definitely granting the item. Honestly, I think it's most likely something I'm doing wrong in JavaScript, but I'm not well versed enough in JavaScript to figure it out. Thank you for your time!
var pull = server.GrantItemsToUser({ "PlayFabId": currentPlayerId, "ItemIds": [lastId] }); var results = pull.ItemGrantResults; var instId = results.ItemInstanceId; return { message: instId };