Board Thread:Questions and Answers/@comment-6396609-20130209170452

I made a script but i keep getting an eof error please help... this is my scrpt

os.pullEvent = os.pullEventRaw

print (" WELCOME USER...")

print ("PASSWORD:")

write ("")

x = io.read

if x == "password" then

term.clear

term.setCursorPos ( 1, 1 )

textutils.slowPrint ("LOG IN SUCCESSFUL")

textutils.slowPrint ("ACCESS GRANTED...")

sleep(2)

term.clear

term.setCursorPos ( 1, 1 )

shell.run "mainmenu"

end

else

print ("WRONG PASSWORD, PLEASE TRY AGAIN.")

write ("")

x = io.read

if x == "password" then

term.clear

term.setCursorPos ( 1, 1 )

textutils.slowPrint ("LOG IN SUCCESSFUL")

textutils.slowPrint ("ACCESS GRANTED...")

sleep(2)

term.clear

term.setCursorPos ( 1, 1 )

shell.run "mainmenu"

end

else

repeat

term.clear

term.setCursorPos ( 1, 1 )

textutils.slowPrint ("PASSWORD INCORRECT!")

textutils.slowPrint ("FAILSAFE INITIATED!")

redstone.setOutput ("back", true )

sleep(1)

textutils.slowPrint ("ALARM ACTIVATED!")

textutils.slowPrint ("ENTER FAILSAFE PASSWORD TO DEACTIVATE ALARM")

textutils.slowPrint ("PASSWORD:")

write ("")

x = io.read

if x == "password2" then

textutils.slowPrint ("PASSWORD ACCEPTED")

textutils.slowPrint ("POWERING OFF ALARM...")

redstone.setOutput ("back", false )

sleep(2)

term.clear

term.setCursorPos ( 1, 1 )

shell.run "mainmenu"

break

end

else

term.clear

term.setCursorPos ( 1, 1 )

textutils.slowPrint ("PASSWORD INCORRECT!")

textutils.slowPrint ("FAILSAFE INITIATED!")

textutils.slowPrint ("ENTER FAILSAFE PASSWORD TO DEACTIVATE ALARM")

textutils.slowPrint ("PASSWORD:")

sleep(2)

end

until i==3

end  