Posted 15 September 2013 - 01:09 PM
Im making a program for a password protected door. For the first part it does everything fine but when it gets to the redstone output boolean variable, it says: startup:8: Expected string, boolean.
Heres the code:
term.clear()
term.setCursorPos(1,1)
write("Enter password: ")
local P = read("*")
if P == "junior" then
print("correct")
sleep(1)
redstone.setOutput(left, 1)
sleep(1)
redstone.setOutput(left, 0)
else
print("Incorrect")
sleep(1)
os.reboot()
end
os.reboot()
Please help.
Heres the code:
term.clear()
term.setCursorPos(1,1)
write("Enter password: ")
local P = read("*")
if P == "junior" then
print("correct")
sleep(1)
redstone.setOutput(left, 1)
sleep(1)
redstone.setOutput(left, 0)
else
print("Incorrect")
sleep(1)
os.reboot()
end
os.reboot()
Please help.