Posted 07 July 2012 - 01:40 PM
Im trying to make a script that turns on / off certain machines in my tekkit house.
Error:
No idea whats wrong. I had the 'ends' before and now I removed them and its still not working.
—Update—
Figured out the end part but now nothing happens :
Spoiler
term.clear() -- 1
print("Choose your options.") -- 2
print("1. Shroom") -- 3
print("2. Engines") -- 4
debug = "roflmao" -- 6
shrooms = "1" -- 7
shroom = true -- 8
engines = "2" -- 9
engine = true -- 10
input = read(); -- 11
term.clear() -- 12
function choose() -- 14
if input == shrooms and shroom == false then -- 15
rs.setBundledOutput("back", rs.getBundledOutput("back")+2048) -- 16
print("Shrooms have been toggled. Have a nice day."); -- 17
shroom = true -- 18
term.clear() -- 19
chose() -- 20
else -- 22
if input == shrooms and shroom == true then -- 23
rs.setBundledOutput("back", rs.getBundledOutput("back")-2048) -- 24
print("Shrooms have been toggled. Have a nice day.") -- 25
shroom = false -- 26
term.clear() -- 27
chose() -- 28
else --30
if input == engines and engine == false then
rs.setBundledOutput("back", rs.getBundledOutput("back")+1)
print("Engines have been toggled. Have a nice day.")
engine = true
term.clear()
chose()
else
if
input == engines and engine == true then
rs.setBundledOutput("back", rs.getBundledOutput("back")-1)
print("Engines have been toggled. Have a nice day!")
engine = false
term.clear()
chose()
else
if
input == debug then
term.clear()
exit()
end
end
end
end
end
end
function chose()
choose()
end
Spoiler
bios:206: [string "startup"]:54: 'end' expected (to close 'if' at line 47)
—Update—
Figured out the end part but now nothing happens :