Posted 12 January 2013 - 01:45 PM
I am having trouble with this program i'm trying to make. It will control the opening and closing of my dam. I keep getting an error though. Heres the error: bios:206: [string "Password]:38: 'end' expected (to close 'if' at line 8)
Here's the program…
os.pullEvent = os.pullEventRaw
print ("Welcome To Dam Management. Please enter control center password:")
write ("")
password = io.read()
if password == "hiitsme123" then
print ("Correct. Welcome mustbuildhouse!")
term.clear()
print ("What would you like to do?")
print ("Close Flood Gates")
print ("or")
print ("Open Flood Gates")
write ("")
command1 = io.read
if command1 == "Open" then
rs.setBundledOutput("right", colors.white)
sleep(8.0)
if command1 == "Close" then
rs.setBundledOutput("right", colors.black)
sleep(8.0)
else
term.clear()
textutils.slowPrint ("Incorrect. Please exit and try again!")
end
os.shutdown()
end
All correct spacing. PLease help!
Here's the program…
os.pullEvent = os.pullEventRaw
print ("Welcome To Dam Management. Please enter control center password:")
write ("")
password = io.read()
if password == "hiitsme123" then
print ("Correct. Welcome mustbuildhouse!")
term.clear()
print ("What would you like to do?")
print ("Close Flood Gates")
print ("or")
print ("Open Flood Gates")
write ("")
command1 = io.read
if command1 == "Open" then
rs.setBundledOutput("right", colors.white)
sleep(8.0)
if command1 == "Close" then
rs.setBundledOutput("right", colors.black)
sleep(8.0)
else
term.clear()
textutils.slowPrint ("Incorrect. Please exit and try again!")
end
os.shutdown()
end
All correct spacing. PLease help!