Sign In Register

How can we help you today?

Start a new topic
Answered

How to access Virtual Goods data.

Hello, 


I have a shop scene where at the opening I ask for an AccountDetailsRequest, so I can know how much currency the player has and the virtual goods that this players has already bought: I need a list of the shortcodes of goods held by the player.


In my code editor, the response.VirtualGoods is classed as GameSparks.Core.GSData, but I have no idea how this data is structured. How can I access it?


Best Answer

Of course I had no virtual goods matching that shortcode. I was connecting to a live snapshot where that virtual good didn't exist.


I thought that I could indeed see how it's made by buying a virtual good and then see what's in the data when I request again, by using a Debug Build...

However I get the error: virtual good shortcode UNKNOWN. But I have checked and it's the same as I set in the portal...

And now I have just seen that there is a perfect example in the docs. Pardon.
However I still get that UNKNOWN shortcode error.

No, I've confused. It's not an example for the AccountDetailsRequest in the docs... It's better I close this laptop.

Answer

Of course I had no virtual goods matching that shortcode. I was connecting to a live snapshot where that virtual good didn't exist.

Login to post a comment