local stringInfo = pIM.getInvName() print(stringInfo)
here is my code. it "attempts to call nil at line 4"
local chest = peripheral.wrap("front")
local pIM = peripheral.wrap("left")
chest.swapStacks(1,2)
local cSize = chest.getSizeInventory() -- line 4 is here
local pInvSize = pIM.getSizeInventory()
for i = 1, pIM.getSizeInventory() do
local tableInfo = pIM.getStackInSlot(i)
if pIM.getStackInSlot(i) then
for key, value in pairs(tableInfo) do
--print(key .. " = " .. tostring(value))
if key == "name" then
print("slot "..i.." contains "..value)
end
end
end
end
Edited by CCJJSax, 08 November 2013 - 10:18 PM.












