Перейти к содержимому

pyanyj_shashlyk

Пользователи
  • Публикации

    1
  • Зарегистрирован

  • Посещение

Сообщения, опубликованные пользователем pyanyj_shashlyk


  1. modem = peripheral.find("modem")
    trans = 15
    modem.open(11)
    function chest_chk(side)
        local tableN = {}
        local chest = peripheral.wrap(side) 
        for slot, item in pairs(chest.list()) do
            local tabler = string.format("%s %s", item.name, item.count)
            table.insert(tableN,slot,tabler)
            sot = slot
        end
        local size = 54 - sot
        table.insert(tableN, sot + 1, size)
        return tableN
        end
    local event, side, channel, replyChannel, message, distance
    repeat
        event, side, channel, replyChannel, message, distance = os.pullEvent("modem_message")
    until channel == 11
    if message == "Update" then
        turtle.forward()
        for i = 0, 13, 1 do
            turtle.forward()
            chest_chk("left")
            chest_chk("right")
            os.sleep(0,2)
        end
        for i = 0, 13 do
            turtle.back()
        end
    end

    Ругается на .list() в 7 строке и не едет

×
×
  • Создать...