mjmac85

readin

Nov 27th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. -- set up monitor
  2. attachedMonitor = peripheral.wrap("right")
  3. attachedMonitor.setBackgroundColor(colors.black)
  4. attachedMonitor.setTextColor(colors.white)
  5. attachedMonitor.setTextScale(.5)
  6. attachedMonitor.clear()
  7.  
  8.  
  9.  
  10.  
  11. local file = 'db'
  12. local lines = lines_from(file)
  13.  
  14. --local f = io.open(file, "rb")
  15. lines = {}
  16. data = {}
  17. i = 2
  18. for line in io.lines(file) do
  19.     data[i] = line
  20.     i = i + 1
  21. end
  22. data[1] = i
  23.  
  24. for i=2,data[1] do
  25.     attachedMonitor.write(line)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment