peripheral_detach event

peripheral_detach
Event
Returns
  • name : string The side or network name of the peripheral that was detached.

Source CC:Tweaked

Occurs every time a peripheral is detached.

ExampleAlert on peripheral detachment
Waits for a peripheral to be detached and alerts the user when it occured.
Code
<nowiki>
local event, peripheral_name = os.pullEvent("peripheral_detach")
print("Peripheral", peripheral_name, "has been detached.")
    </nowiki>
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.