Posted 26 March 2016 - 04:05 AM
Hey.
Writing an airlock door control system program.
When clicking, it does not work.
Help?
Asking Because I am too tired to diagnose.
Writing an airlock door control system program.
When clicking, it does not work.
Help?
Asking Because I am too tired to diagnose.
Spoiler
img = paintutils.loadImage("/ppc/iapps/img")
paintutils.drawImage(img,1,1)
term.setCursorPos(3,5)
term.setBackgroundColor(colors.lime)
write("<>")
term.setBackgroundColor(colors.red)
term.setCursorPos(7,5)
function control()
rednet.open("back")
button, x, y = os.pullEvent("mouse_click")
if x == 3 or x == 4 and y == 10 then
print("open1")
rednet.send(36,"open1")
elseif x == 7 or x == 8 and y == 10 then
print("close1")
rednet.send(36,"close1")
elseif x == 3 or x == 4 and y == 19 then
print("open2")
rednet.send(37,"open2")
elseif x == 7 or x == 8 and y == 19 then
print("close2")
rednet.send(37,"close2")
else
end
control()
end
write("><")
term.setBackgroundColor(colors.lime)
term.setCursorPos(3,10)
write("<>")
term.setCursorPos(7,10)
term.setBackgroundColor(colors.red)
write("><")
term.setBackgroundColor(colors.gray)
term.setCursorPos(1,19)
print("EXIT")
control()
Edited on 26 March 2016 - 03:17 AM