Hello,
I'm trying to read "AmmoPrice" custom data in Cloudscript. This is how it is declared.
This is how I try to read it, however, the variable "price" is null in this code.
// GetItemByID calls GetCatalogItems function and returns the matched item. It doesn't return null in this case var item = GetItemByID(args.ItemID); var itemCustomData = JSON.parse(item.CustomData); var price = parseInt(itemCustomData["AmmoPrice"]["Money"]);
It's interesting though. When I try to read "Price" custom data, I can read it without a problem, but when the custom data is JSON, I cannot read it.
Also, I can read "AmmoPrice" in Unity as JSON, and separate it into "Money" and "Coins"