What must i change the line that it takes only "Coal" or "Wood"?
I konw this line is wrong ... if item = "coal" or "wood" then
Code: Select all
if #items > 0 then
inventory = collector.getinventory(1)
for _,item in pairs(items) do
if item = "coal" or "wood" then
if not item.isitemonbelt() then
if inventory.caninsert(item.stack) then
inventory.insert(item.stack)
item.destroy()
break
end
end
end
end
end