Advertisement
DOGGYWOOF

Untitled

Jul 31st, 2024
3
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. -- Check if the printer is connected
  2. if not peripheral.isPresent("right") then
  3. print("No printer found on the right side.")
  4. return
  5. end
  6.  
  7. -- Get the printer peripheral
  8. local printer = peripheral.wrap("right")
  9.  
  10. -- Check if the printer is ready to print
  11. if not printer then
  12. print("Could not wrap the printer peripheral.")
  13. return
  14. end
  15.  
  16. -- Eject the printed page
  17. printer.eject()
  18.  
  19. print("Page ejected.")
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement