Posted 09 October 2012 - 07:55 PM
So i am trying to make a program that opens a massive gate for me, just one problem im getting
bios:206: [string "gate"]:51: 'end' expected (to close 'while' at line 1)
bios:206: [string "gate"]:51: 'end' expected (to close 'while' at line 1)
while true do
term.clear()
term.setCursorPos(1,1)
print("Open Or Close?")
if input == "Close" then
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("back", false)
sleep(1)
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("back", false)
sleep(1)
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("back", false)
sleep(1)
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("back", false)
sleep(1)
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("back", false)
sleep(1)
print("Closed Now!")
end
if input == "Open" then
redstone.setOutput("right", true)
sleep(1)
redstone.setOutput("right", false)
sleep(1)
redstone.setOutput("right", true)
sleep(1)
redstone.setOutput("right", false)
sleep(1)
redstone.setOutput("right", true)
sleep(1)
redstone.setOutput("right", false)
sleep(1)
redstone.setOutput("right", true)
sleep(1)
redstone.setOutput("right", false)
sleep(1)
redstone.setOutput("right", true)
sleep(1)
redstone.setOutput("right", false)
sleep(1)
print("Open Now!")
end
else
print("Command Not Recognised")
print("Try With CAPS")
end
end
Thanks in advance guys