Posted 29 March 2012 - 02:01 AM
Hello, I'm very new to computercraft and even newer to LUA (today haha)
and I'm trying to make a simple multi on/off switch right now, in which case here is the code:
Main (program name)
bios:206: [string"Main"]:17: 'then' expected
if it helps I have tekkit installed so there is computercraft and redpower
I have no idea what to do, I've look at the debugging page and it didn't help, plus google'd for like an hour :o/>/>
thanks for any help!
and I'm trying to make a simple multi on/off switch right now, in which case here is the code:
print("Welcome to the main control panel")
sleep(1)
term.clear()
sleep(1)
term.setCursorPos(1,1)
print("Would you like to change properties of...")
print("1 Engines")
print("2 Tree Farm")
print("3 Peat Farm")
sleep(1)
local comp = io.read()
if comp == "1" then
term.clear()
term.setCursorPos(1,1)
print("Engine Control")
print("Current status:")
if redstone.test.BundledInput("back", colors.white) = true then <---- everythig worked fine until I input this line onward
print("Active")
if redstone.test.BundledInput("back", colors.white) = false then
print("Inactive")
and tehn when I try and run it I get this eror:Main (program name)
bios:206: [string"Main"]:17: 'then' expected
if it helps I have tekkit installed so there is computercraft and redpower
I have no idea what to do, I've look at the debugging page and it didn't help, plus google'd for like an hour :o/>/>
thanks for any help!