local pullEvent = os.pullEvent
os.pullEvent = os.pullEventRaw
localside = "back"
local password = "14363"
local opentime = 5
while true do
term.clear()
term.setCursorPos(1,1)
write("Password:")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,1)
print("Access Granted")
rs.setOutput(side,true)
sleep(opentime)
else
print("Access Denied")
sleep(30)
end
end
Unable to end a program
Started by axel.codeFail(), Dec 17 2013 10:10 PM
6 replies to this topic
#1
Posted 17 December 2013 - 10:10 PM
I made a program to lock my door with a password, just like alot of other people, and I put "os.pullEvent = os.pullEventRaw" at the top, but forgot to add a modifier to it. And in turn, the program won't end. Is there any way to end it, or is it forever running?
#2
Posted 18 December 2013 - 06:53 AM
He can make a floppy disk with a empty startup file on it. Then after placing said floppy in disk drive next to computer restart computer. It will load up startup from floppy first (empty so nothing will happen) then go to standard shell where he can edit program.
Edited by Lyqyd, 18 December 2013 - 10:21 AM.
#3
Posted 18 December 2013 - 09:48 PM
Oh, it's that simple? Cool, thanks.
#4
Posted 18 December 2013 - 11:43 PM
Here's a nice fix to your code
local pullEvent = os.pullEventRaw
local side = "back"
local password = "14363"
local opentime = 5
while true do
term.clear()
term.setCursorPos(1,1)
print("Password:")
if read("*") == password then
term.clear()
term.setCursorPos(1,1)
print("Access Granted")
rs.setOutput(side,true)
sleep(opentime)
rs.setOutput(side,false)
else
print("Access Denied")
sleep(3) --Don't do it TOO long: P
end
end
#5
Posted 19 December 2013 - 02:56 AM
Death, on 18 December 2013 - 11:43 PM, said:
Here's a nice fix to your code
local pullEvent = os.pullEventRaw
pullEvent = os.pullventRawwith
os.pullEvent = os.pullEventRaw
Heat must be getting to everyone
theoriginalbit, on 19 December 2013 - 02:18 AM, said:
Edit: Air conditioner is at other end of the house :/
Edited by jay5476, 19 December 2013 - 02:57 AM.
#6
#7
Posted 19 December 2013 - 07:40 AM
I keep forgetting you can't do that. The other parts of the code were good, right?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











