Inventory Data

Inventory Item members

id - integer item ID

amount - integer item amount

Example usage

The GetInventory function retrieves a list of items, each identified by an ID and quantity. Here's a sample script demonstrating how to iterate through the list and output each item's ID and quantity in a clear format:

for _, item in pairs(GetInventory()) do
    log(("Inventory Item: %d %dx"):format(item.id, item.amount))
end

Output

Inventory Item: 18 1x
Inventory Item: 32 1x
Inventory Item: 2 2x
Inventory Item: 728 1x
Inventory Item: 3 1x
Inventory Item: 9719 2x

Last updated