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

password door dont work : bios:14: [string "temo"]:17: 'than' expected

Started by iak33, 29 January 2016 - 07:13 AM
iak33 #1
Posted 29 January 2016 - 08:13 AM
Hey i working on this program but its not working :

  • os.pullEvent = os.pullEventRaw – makes it so no one can terminate the program
  • redstone.setOutput("Left",true)
  • pass = "Maggi"
  • pass2 = "Kromminga"
  • while true do
  • term.clear()
  • term.setCursorPos(12,5)
  • print("Please Enter The Password")
  • term.setCursorPos(12,6)
  • input = read("*")
  • if input == pass then
  • rs.setOutput("right",true)
  • sleep(2)
  • rs.setOutput("right",false)
  • os.reboot()
  • elseif
  • input = = pass2 then
  • print("Starte Wartungsmodus…")
  • print(" ")
  • redstone.Output("left",false)
  • else
  • term.setCursorPos(12,7)
  • print("WRONG PASSWORD")
  • sleep(2)
  • end
  • end
  • end

i dont know how i can fix the error i hope anyone can help me here .
Bomb Bloke #2
Posted 29 January 2016 - 11:27 AM
Line 17 reads like this:

input = = pass2 then

Change "= =" to "==".