question

brendan avatar image
brendan asked

Inventory order

Question from a developer:

When I call GetUserInventory from client, I get an array in the order in which I added the items, or not?

In-Game EconomyPlayer Inventory
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

No, the order in which the items are returned isn't guaranteed, so you would need to use the PurchaseDate (which shows up as the item creation date in the Game Manager) on the ItemInstance to sort them by when they were added to the player's inventory.

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.