4 posts
Posted 30 November 2012 - 11:49 AM
I want to make a program that will only clear the 4th and 5th lines.
term.clear() clears everything, so I'm guessing that there's something that you put in the "()"s?
1688 posts
Location
'MURICA
Posted 30 November 2012 - 12:10 PM
You can just go to the line with term.setCursorPos(), then use term.clearLine().
term.setCursorPos(1,4)
term.clearLine()
term.setCursorPos(1,5)
term.clearLine()
2088 posts
Location
South Africa
Posted 30 November 2012 - 01:25 PM
Or make a function to clear a specific line which I use in my programs.
function clrLine(y)
cX, cY = term.getCursorPos()
term.setCursorPos(1,y)
term.clearLine()
term.setCursorPos(cX, cY)
end
The getting cursor position and setting it back to it is only if you need that, I just added it now but I don't use it.