--[[
This is what 'PlayersInventory' looks like:
Main = {
[1] = {Type = 'Weapon', Name = 'Wooden Sword', Durability = 50},
[2] = nil,
[3] = {Type = 'Material', Name = 'Wood', Quantity = 4},
[4] = {Type = 'Tool', Name = 'Wooden Axe', Durability = 50},
[5] = nil
},
Stored = {
[1] = nil,
[2] = nil,
[3] = nil,
[4] = nil,
[5] = nil,
[6] = nil,
[7] = nil,
[8] = nil,
[9] = nil,
[10] = nil,
}
]]
local PlayersInventory = InventoryCheck:InvokeServer()
local function Setup()
-- Setup main slots
print(#PlayersInventory.Main)
for i, v in pairs(PlayersInventory.Main) do
print(i, v)
end
end
Setup()
When I go print(#PlayersInventory.Main) it should print 5, and go through all slots of the Main table. However it just prints 1. Iām guessing it has something to do with the nil settings? I do that because if that slot is left empty then it needs to stay empty.