Advertisement
Guest User

startup

a guest
Aug 12th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. --os.pullEvent() = os.pullEventRaw()
  2.  
  3. --Variables
  4. local pressure = 0
  5. local purpose = "Pressure Reg"
  6. local group = 1
  7. serverID = 999
  8. returnChan = 9
  9. protocol = "unknown"
  10.  
  11. --APIs
  12. os.loadAPI("laserMenu")
  13.  
  14. --Functions
  15. function getReturnInfo()
  16.   rednet.open("top")
  17.   print("Waiting for Return Channel")
  18.   serverID, returnChan, protocol = rednet.receive(20)
  19.   if serverID > 0 then
  20.     print("Successful Connecttion!")
  21.     print(serverID)
  22.     print(returnChan)
  23.     print(protocol)
  24.   else
  25.     print("ERROR!")
  26.   end
  27.  
  28.   return serverID,returnChan,protocol
  29. end
  30.  
  31. print("Pre call...")
  32. print(serverID)
  33. print(returnChan)
  34. print(protocol)
  35.  
  36. serverID,returnChan,protocol = getReturnInfo()
  37. print("Almost done...")
  38. print(serverID)
  39. print(returnChan)
  40. print(protocol)
  41. --print(altID)
  42.  
  43. sleep(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement