Posted 22 July 2015 - 06:33 PM
-=Solved=-
So i was compiling a program for my reactor setup for Tekkit Classic, it was going fine but when i got to a certain part it had an error. Can someone help?
local sid = 0
function menu(id, text)
if sid == id then
write(">")
else
write(" ")
end
print(text)
end
while true do
term.clear()
term.setCursorPos(1,1)
print("-=Reactor OS V.1.2=-")
term.setCursorPos(3,3)
menu(0, "Reactor Control")
term.setCursorPos(3,5)
menu(1, "Coolent Cells")
term.setCursorPos(3,7)
menu(2, "Uranium Cells")
term.setCursorPos(3,9)
menu(3, "Reactor Door")
eveny, key = os.pullEvent("key")
if key == 200 then
if sid > 0 then
sid = sid - 1
end
elseif key == 208 then
if sid = < 3 then
sid = sid + 1
end
elseif key == 28 then
if sid == 0 then
redstone.setBundledOutput("back", colors.white)
elseif sid = 1 then
redstone.setBundledOutput("back", colors.orange)
elseif sid = 2 then
redstone.setBundledOutput("back", colors.magenta)
elseif sid = 3 then
redstone.setBundledOutput("back", colors.lightblue)
end
end
end
The Error i got was as follows
bios:206: [string "startup"]:29: 'then' expected
I have tried multiple things but i can't get it to work.
*This program isn't finished yet*
So i was compiling a program for my reactor setup for Tekkit Classic, it was going fine but when i got to a certain part it had an error. Can someone help?
local sid = 0
function menu(id, text)
if sid == id then
write(">")
else
write(" ")
end
print(text)
end
while true do
term.clear()
term.setCursorPos(1,1)
print("-=Reactor OS V.1.2=-")
term.setCursorPos(3,3)
menu(0, "Reactor Control")
term.setCursorPos(3,5)
menu(1, "Coolent Cells")
term.setCursorPos(3,7)
menu(2, "Uranium Cells")
term.setCursorPos(3,9)
menu(3, "Reactor Door")
eveny, key = os.pullEvent("key")
if key == 200 then
if sid > 0 then
sid = sid - 1
end
elseif key == 208 then
if sid = < 3 then
sid = sid + 1
end
elseif key == 28 then
if sid == 0 then
redstone.setBundledOutput("back", colors.white)
elseif sid = 1 then
redstone.setBundledOutput("back", colors.orange)
elseif sid = 2 then
redstone.setBundledOutput("back", colors.magenta)
elseif sid = 3 then
redstone.setBundledOutput("back", colors.lightblue)
end
end
end
The Error i got was as follows
bios:206: [string "startup"]:29: 'then' expected
I have tried multiple things but i can't get it to work.
*This program isn't finished yet*
Edited on 22 July 2015 - 04:58 PM