1. Hey guys,

    GetInventoryItemsForSlot() (http://wowprogramming.com/docs/api/GetInventoryItemsForSlot) isnt working for me. Wowlua says, the syntax isnt returnTable = GetInventoryItemsForSlot(slot), but GetInventoryItemsForSlot(slot, returnTable), found a source that says both is right...

    But nothing is working.

    Thanks for helping :)!

  2. Have the empty table declared before you call GetInventoryItemsForSlot(), and note the additional value for voidstorage returned by EquipmentManager_UnpackLocation().

    local equipmentSlots = {
        "HeadSlot",
        "NeckSlot",
        "ShoulderSlot",
        "ChestSlot",
        "WaistSlot",
        "LegsSlot",
        "FeetSlot",
        "WristSlot",
        "HandsSlot",
        "Finger0Slot",
        "Finger1Slot",
        "Trinket0Slot",
        "Trinket1Slot",
        "BackSlot",
        "MainHandSlot",
        "SecondaryHandSlot",
    }
    
    local equippableItems = {}
    
    for i, v in pairs(equipmentSlots) do
        local id, texture, checkRelic = GetInventorySlotInfo(v)
        GetInventoryItemsForSlot(id, equippableItems)
        for locationBitstring, itemID in pairs(equippableItems) do
            local player, bank, bags, voidstorage, slot, bag = EquipmentManager_UnpackLocation(locationBitstring)
            print("player = " .. tostring(player) .. "\nbank = " .. tostring(bank) .. "\nbags = " .. tostring(bags) .. "\nvoidstorage = " .. tostring(voidstorage) .. "\nslot = " .. tostring(slot) .. "\nbag = " .. tostring(bag))
        end
    end