Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("top")
- modem.open(10)
- local f = fs.open("row.lua", "r")
- row = tonumber(f.readLine())
- f.close()
- function get(str, index)
- i = 1
- for cur in str:gmatch("%S+") do
- if i == index then
- return cur
- end
- i = i + 1
- end
- return "0"
- end
- while true do
- e, _, _, _, message = os.pullEvent("modem_message")
- value = tonumber(get(message, row))
- print(value)
- rs.setBundledOutput("back", value)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement