Peripheral detach (event)

From ComputerCraft Wiki
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
Code
while true do
  local event, side = os.pullEvent("peripheral_detach")
  print("The peripheral ", side, " has been disconnected")
end



Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox