Advertisement
nitrogenfingers

Untitled

Feb 2nd, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. modemFound = false
  2. for _,side in pairs(rs.getSides()) do
  3. if peripheral.getType(side) == "modem" then
  4. print("Modem found")
  5. rednet.open(side)
  6. modemFound = true
  7. break
  8. end
  9. end
  10.  
  11. if not modemFound then
  12. print("No modem found- exiting")
  13. return --or something
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement