Advertisement
DOGGYWOOF

Modem Checker

Jun 8th, 2024
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. -- Check if there is a modem on the left side
  2. local side = "left"
  3. local modem = peripheral.wrap(side)
  4.  
  5. if modem == nil then
  6. -- No modem found on the left side
  7. print("Error: No modem found on the left side of the device.")
  8. else
  9. -- Modem found on the left side
  10. print("Modem detected on the left side of the device.")
  11. end
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement