2 posts
Posted 18 October 2012 - 03:15 AM
I'm new to CC, and I would like to know if someone could help me make a system where a user pops a floppy disk into a Disk Drive, verify's the disk, and opens a door.
:3
864 posts
Location
Sometime.
Posted 18 October 2012 - 03:18 AM
Here
passkey = "PASSWORD"
while true do
if disk.isPresent("SIDE") then -- Put side to the side the disk drive is on
h = fs.open("disk/passcode", "r")
if h.readAll() == passkey then
print("Accepted")
-- Insert anything here for the code, rs.setOutput() whatever..
else
print("Denied")
disk.eject("side") -- Replace side with diskdrive side
end
end
end
2 posts
Posted 18 October 2012 - 04:11 AM
Here
passkey = "PASSWORD"
while true do
if disk.isPresent("SIDE") then -- Put side to the side the disk drive is on
h = fs.open("disk/passcode", "r")
if h.readAll() == passkey then
print("Accepted")
-- Insert anything here for the code, rs.setOutput() whatever..
else
print("Denied")
disk.eject("side") -- Replace side with diskdrive side
end
end
end
Awesome! Do I edit this on the Computer startup, or on the disk?
also, do I have to format how it is you sent me?
Edited on 18 October 2012 - 02:18 AM
252 posts
Posted 18 October 2012 - 05:16 PM
Lol, I have made one of these… :P/>/> Feel free to check out the code to see how it works if you like. :)/>/>
Here is the link to the thread.