for Key,Slot in pairs(self.Data) do
if #Slot == 0 then
print(Slot,#Slot)
if Slot == "Extra" then
self.Data["Extra"][Item] = Amount
break
else
CurrentSlot = Key
self.NumSlots += 1
self.Data[Key][Item] = Amount
break
end
end
Key += 1
end
This code is looping through slots for an inventory to find next empty one. if #Slot == 0 then
is never false, and print(Slot,#Slot) prints {...}, 0
Never 1. Am I trying to detect the content in the wrong way, or does it have to do with the table?