Code:
function Check()
local x= peripheral.isPresent("left")
local y= peripheral.getType("left")
If x==true and y=="drive" then disk.eject("left") end
end
Check()
I just don't get it !! What's wrong with this code ????
Posted 03 May 2013 - 11:55 AM
function Check()
local x= peripheral.isPresent("left")
local y= peripheral.getType("left")
If x==true and y=="drive" then disk.eject("left") end
end
Check()
Posted 03 May 2013 - 12:03 PM
Posted 03 May 2013 - 01:02 PM
Posted 03 May 2013 - 02:27 PM
local oldpull=os.pullEventRaw
function os.pullEventRaw(...)
local p={coroutine.yield(...)}
if p[1]=="disk" then
peripheral.call(p[2],"eject")
end
return unpack(p)
end
-- eject disks
os.pullEventRaw=oldpull
-- stop ejecting disks
0 members, 1 guests, 0 anonymous users