Posted 11 July 2013 - 07:27 AM
Im trying to create a password protected secret entrance on the floor that is powered by frame engine ( thats why i need it to pulse the redstone signal) but i keep on getting: startup:3: index ecpected, got nil when rebooting here is the thingy:
term.clear()
term.setCursorPos(1,1)
ps.pullEvent = os.pullEventRaw
password = "close"
masterpassword = "open"
print("To colse type: close To open type: open")
write "Password:"
local input = read("*")
if input == (password) then
print("Door Closing STAND BACK")
redstone.setOutput("back",true)
sleep(2)
redstone.setOutput("back",true)
sleep(2)
redstone.setOutput("back",true)
sleep(2)
os.shutdown()
elseif input == (masterpassword) then
print("Door Opening STAND BACK")
redstone.setOutput("top",true)
sleep(2)
redstone.setOutput("top",true)
sleep(2)
redstone.setOutput("top",true)
os.shutdown()
else
print("Unknown Command, Check Spelling")
sleep(2)
os.shutdown()
end