veeir

Untitled

Apr 21st, 2024
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. local printer = peripheral.find("printer")
  2.  
  3. -- Start a new page, or print an error.
  4. if not printer.newPage() then
  5. error("Cannot start a new page. Do you have ink and paper?")
  6. end
  7.  
  8. -- Write to the page
  9. printer.setPageTitle("Hello")
  10. printer.write("This is my first page")
  11. printer.setCursorPos(1, 3)
  12. printer.write("This is two lines below.")
  13.  
  14. -- And finally print the page!
  15. if not printer.endPage() then
  16. error("Cannot end the page. Is there enough space?")
  17. end
Add Comment
Please, Sign In to add comment