Posted 10 April 2012 - 10:01 PM
The twist is that the door logs all attempts by sending a rednet signal to another computer, computer #8, and will allow computer #8 to send a single door pass to computer #9. How do I make the door pass send, and how do I save the logs to a disk at computer #8?
@ computer # 8 I get an error: bios:206: [string "startup"] :37: 'end' expected (to close 'function' at line 3)
@ computer # 8 I get an error: bios:206: [string "startup"] :37: 'end' expected (to close 'function' at line 3)
rednet.open("right")
local function entry()
function os. pullEvent() return os.pullEventRaw() end
term.clear()
print("Enter Username")
user=io.read()
print("Enter Password. If you do not have a password, type in REQ-PASS. If you have been denied a password, and request single-use access, type in SINGLE-OPEN")
pass=io.read()
if pass=="Password" then
print ("Access Granted")
redstone.setOutput("left", true)
sleep(2)
redstone.setOutput("left", false)
rednet.send (8, "User" ..user.. "has entered using the correct password.")
sleep(2)
if pass=="REQ-PASS" then
print ("Your request has been sent.")
rednet.send (8, "User" ..user.. " has requested a password to enter.")
sleep(2)
if pass=="SINGLE-OPEN" then
rednet.send (8, "user" ..user.." requested a single usage. ACCEPT/DENY?")
else
print ("Access denied. Attempt logged.")
sleep(2)
end
end
while true do
entry()
end