Posted 21 September 2012 - 07:17 PM
Hey!
Im trying to make a valve door that first will answer if I want to open or not.
Then there is a password required. After that the door should open.
But I only gets the error message:
and here is the code i have done:
Hope someone can help me.
//Sidebelow
Im trying to make a valve door that first will answer if I want to open or not.
Then there is a password required. After that the door should open.
But I only gets the error message:
bios:206: [string "startup"]:39: 'end' expected
(to close 'if' at line 13)
and here is the code i have done:
term.setCursorPos(1,1)
write("Security Guard Valve")
term.setCursorPos(3,1)
write("Do you wish to enter?")
term.setCursorPos(5,1)
write("YES")
term.setCursorPos(6,1)
write("NO")
print " "
correctpass = "yes"
pass = read("*")
if pass == (correctpass) then
term.clear()
term.setCursorPos(1,1)
write("Please enter password: ")
else
print " "
write("Bye!")
os.shutdown()
correctpass = "defcomp"
pass = read("*")
if pass == (correctpass) then
term.clear()
term.setCursorPos(1,1)
write("Please enter!")
redstone.setOutput("back", true)
else
term.setCursorPos(1,1)
write("Denied!")
term.setCursorPos(3,1)
write("System shutdown")
sleep(300)
os.shutdown()
end
Hope someone can help me.
//Sidebelow