question

duartedd avatar image
duartedd asked

Strange Behaviour from cloudscript sent back to game client - Javascript unlocking container iteminstance custom data

Hello I am calling

CloudOpenContainer excecutecloudscript from my unity to open containers - it all works fine and updates the properly via the code except that it doesnt return the customdata within the iteminstance return - basiccally if you look at my code in the cloudscript:

I am - checking the container - opening it up - setting the grantitems to a vvariable - looping through that - checking for a certain class (weapon/armor basically) if yes then give it a randomized bonus stat + name to go with - then attach the name and stat to the iteminstance - that all seems to be working

its just when i goto return that customdata - i dont even see customdata in the return of the granteditems result on the return....Can you see what i am talking about here please

thanks!

line 322 begins the function - in the cloudscript

result below - missing customdata field in the result

data": { "FunctionName": "CloudOpenContainer", "Revision": 466, "FunctionResult": { "UnlockedItemInstanceId": "DC4987FE025D5211", "GrantedItems": [ { "ItemId": "LeatherGauntlets", "ItemInstanceId": "43E666338CF61B22", "ItemClass": "Hands", "PurchaseDate": "2021-04-28T22:35:23.882Z", "Annotation": "Unlocked Crate", "CatalogVersion": "Item Database", "DisplayName": "Leather Gauntlets", "UnitPrice": 0 } ], "VirtualCurrency": { "GO": 10 } },

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

·
duartedd avatar image
duartedd answered

Hmmmm think i know what happened - i was expecting it to supply the granted items as what was in the actual item but derp - it just passes it how it was within the cloudscript - assigned the value to the grantitems customdata item and problem solved

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.