Posted 21 January 2014 - 12:04 AM
So check this out im pretty new to cp craft and ive got a big task on my hands.
Im writing a reactor/factory contol program and i decided to make it as complex as possible for my first task.
What i am trying to do here is have this computer output different set of color profiles on a rednet cable as to do what ever so choose…
problem is im getting an error on the end line saying " 'end' expected (to close 'if' at line
5) which would be the if input == password then.
Im stumped, anyhelp?
Also this code must be able to keep an action going while requesting input to start another and keep said action going unless specified input requests a cancel….i really need to find something better to do with my free time.
Im writing a reactor/factory contol program and i decided to make it as complex as possible for my first task.
What i am trying to do here is have this computer output different set of color profiles on a rednet cable as to do what ever so choose…
problem is im getting an error on the end line saying " 'end' expected (to close 'if' at line
5) which would be the if input == password then.
Im stumped, anyhelp?
Also this code must be able to keep an action going while requesting input to start another and keep said action going unless specified input requests a cancel….i really need to find something better to do with my free time.
print("Enter terminal Access Code")
-- password lock
local password = "password"
term.setCursorPos(1,3)
local input = read()
if input == password then
print("BUNCH OF RANDOM GARBAGE I HAVE IN HERE")
print("about 5 more lines of this of which include the input options to trigger event")
-- everything above this works fine
local input = read()
if input == "reactor" then
redstone.setBundledOutput("back", colors.orange)
sleep(10) -- for testings sake since i have yet to get this to work
end