Posted 14 April 2013 - 01:38 PM
My code does not work! :(/>/>
(Checkbox)
Help please!
(Checkbox)
-- Checkbox does not work!
-- Help please
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.yellow)
print("Checkbox does not work")
term.setCursorPos(1,2)
print("Help please")
term.setCursorPos(40,1)
print("Toggle --> X")
term.setTextColor(colors.white)
---------------- Code --------------------
while true do
local event, button, X, Y = os.pullEvent("mouse_click")
XY = X..","..Y
local V = -5
local Z = 0
if XY == "51,1" and button == 1 then
if Z > V then
V = V + 10
term.clear()
term.setCursorPos(1,1)
print("+")
term.setCursorPos(51,1)
print("X")
end
end
if XY == "51,1" and button == 1 then
if Z < V then
V = V - 10
term.clear()
term.setCursorPos(1,1)
print("-")
term.setCursorPos(51,1)
print("X")
end
end
end
Help please!