This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
aebkea's profile picture

What is wrong with with password locked door?

Started by aebkea, 21 August 2014 - 07:49 PM
aebkea #1
Posted 21 August 2014 - 09:49 PM
Hello, I am trying to make a password protected door with a siren. I am constantly getting an error saying that I need to add an End statement to the end of the program even though I have tried that and it gives the same error. Please help me if you know the cause of this problem. Thank you!

Code: http://pastebin.com/8tEtFnSt
Bomb Bloke #2
Posted 22 August 2014 - 01:29 AM
Either my eye's deceiving me, or that paste is fine. Check to make sure that's what's in the file you're actually running, and post exactly what the error states if you're still having trouble.
Dragon53535 #3
Posted 22 August 2014 - 02:17 AM
That paste is fine and DOES NOT error as i tested it in a single player world, however one error there is that

elseif input == sirenoff then
  term.clear()
  term.setCursorPos(1,1)
  print("Turning off siren.")
  rs.setOutput(siren,false)
Isn't going to show anything as it's instantly being wiped afterwards to put password: i would suggest putting a sleep() in there
aebkea #4
Posted 22 August 2014 - 03:39 AM
Ah, alright guys. Thanks for the help! I worked out that I still had the floppy disk of an older version of the program on a floppy disk in a disk drive next to the computer. Once I removed that then it worked fine. I just didn't realize that the floppy disk would automatically be read in place of the computer's rom.