daily pastebin goal
79%
SHARE
TWEET

startup

a guest Aug 12th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top