Peripheral detach (event)

From ComputerCraft Wiki
Revision as of 11:18, 25 March 2014 by TheOriginalBIT (Talk | contribs) (updated to match peripheral event page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Grid Modem.png  Event peripheral_detach
Fired when a peripheral is disconnected from the computer locally or remotely (over Network Cables).
Returned Object 1 The string of the side/name of the now disconnected peripheral.

Grid paper.png  Example
Prints the side/name of a peripheral when it's disconnected
while true do
  local event, side = os.pullEvent("peripheral_detach")
  print("The peripheral ", side, " has been disconnected")