Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pack(...)
- retVal = {}
- for i, v in ipairs(arg) do
- table.insert(retVal, v)
- end
- return retVal
- end
- function writeToMonitors(monitors, word)
- for i, v in ipairs(monitors) do
- v.setCursorPos(1,1)
- v.write(word)
- end
- end
- monitors = pack(peripheral.find("monitor"))
- writeToMonitors(monitors, "Hello, World!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement