Posted 13 March 2014 - 09:24 AM
Hello guys I need help because of this code
it says the paintutils:45: bad argument: double expected, got nil
function main()
term.setBackgroundColor(colors.white)
term.clear()
term.setCursorPos(1,1)
os.sleep(0.1)
while true do
term.setBackgroundColor(colors.lightBlue)
term.clear()
paintutils.drawLine(1, 1, screenX, 1, colors.cyan)
term.setTextColor(colors.black)
term.setCursorPos(1,1)
print("System Applications")
term.setBackgroundColor(colors.lightBlue)
term.setTextColor(colors.black)
term.setCursorPos(1,4)
print("[CMD]")
term.setBackgroundColor(colors.lightBlue)
term.setTextColor(colors.black)
term.setCursorPos(1, 3)
print("(Test Mouse Work)")
term.setBackgroundColor(colors.cyan)
term.setCursorPos(40,1)
term.setTextColor(colors.black)
print("[X]")
local event, button, X, Y = os.pullEventRaw("mouse_click")
if X >= 1 and X <= and Y == 1 and button == 1 then
print("Test Mouse")
sleep(0.5)
loop()
elseif X >= 1 and X <= 10 and Y == 4 and button == 1 then
sleep(0.5)
shell.run("/isaacos/Programs/cmd.lua")
elseif X >= 40 and X <= 43 and Y == 1 and button == 1 then
sleep(0.5)
shell.run("/isaacos/system/x16/os.lua")
end
end
end
function loop()
term.clear()
sleep(0.5)
main()
end
main()
screenX, screenY = term.getSize()
it says the paintutils:45: bad argument: double expected, got nil