What I am trying to do here is loop thru my bags to find items that match an item id. FaithfulDeleteList is a saved variable table of ids that are previously added, but it never reaches the line that should print "is this thing on?" I can't seem to find where I am going wrong?
Code:
if event == "ITEM_PUSH" then
-- Search my bags for item
for bag=0,4 do
for slot=1,32 do
local bagItemID=GetContainerItemID(bag,slot)
for i = 1, #FaithfulDeleteList, 1 do
if bagItemID then
if bagItemID == FaithfulDeleteList[i] then
print("is this thing on?")
end
end
end
end
end
end