question

zymakenneth avatar image
zymakenneth asked

Mismatch primitive type used for Currency API's

Applicable to Unity DSK 2.20.170411.

The type for GetCatalogItemsResult.Catalog.VirtualCurrencyPrices is unsigned int while the type expected as an input parameter in PurchaseItemRequest.Price is an int.

Is there a reason for this type mismatch? I would expect both to be the same primitive type and have the same value range. This makes for more difficult use of the API and I am not sure what is the true range for a price (although I doubt anyone in my game will be paying MaxInt for anything :) )

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

·
brendan avatar image
brendan answered

Simply put, this is down to loose requirements when we initially defined the economy system. You are indeed correct that they should be the same primitive type, and I've opened a bug on that to make sure we correct that when we revise the system (we can't realistically change it out from under folks now, as that would be a breaking change).

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

zymakenneth avatar image zymakenneth commented ·

Thank you! I'll post in bugs when I find these types of things. This is an awesome product so keep up the good work (so much so I looked at the job board but realized you are all the way in Seattle :( )

0 Likes 0 ·

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.