Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- set up monitor
- attachedMonitor = peripheral.wrap("right")
- attachedMonitor.setBackgroundColor(colors.black)
- attachedMonitor.setTextColor(colors.white)
- attachedMonitor.setTextScale(.5)
- attachedMonitor.clear()
- local file = 'db'
- local x = 3
- local y = 5
- --local f = io.open(file, "rb")
- lines = {}
- data = {}
- i = 2
- for line in io.lines(file) do
- data[i] = line
- i = i + 1
- end
- data[1] = i
- for i=2,data[1] do
- attachedMonitor.setCursorPos(x,y)
- attachedMonitor.write(line)
- y = y + 1
- end
- --attachedMonitor.write(lines)
Advertisement
Add Comment
Please, Sign In to add comment