36 posts
Posted 23 April 2013 - 12:21 PM
Title self explanatory. It doesn't matter from what code. Some simple like this:
term.clear()
term.setCursorPos(1,1)
print("Hi")
sleep(2)
term.clearLine()
term.setCursorPos(1,2)
print("How are you?")
sleep(2)
Neither.
Someone got a solution? I need to clear the line D:
1688 posts
Location
'MURICA
Posted 23 April 2013 - 12:27 PM
When you use print, the function automatically moves the cursor position down to the next line. Try using term.write instead.
1522 posts
Location
The Netherlands
Posted 23 April 2013 - 12:41 PM
When you use print, the function automatically moves the cursor position down to the next line. Try using term.write instead.
I remember that you said somewhere that using write is much better then the term.write :P/>
1688 posts
Location
'MURICA
Posted 23 April 2013 - 12:43 PM
When you use print, the function automatically moves the cursor position down to the next line. Try using term.write instead.
I remember that you said somewhere that using write is much better then the term.write :P/>/>
The better of the two functions depends on your purpose. If you're rendering windows and GUIs and such, it's better to use term.write, and when making console applications, you should just use write.
The difference being that write word-wraps what you print, and if you use it with a GUI, some parts of it might appear on the left side of the screen if carelessly implemented. term.write does not word wrap, and is better for drawing, but text gets cut off if it's too long.
1214 posts
Location
The Sammich Kingdom
Posted 23 April 2013 - 12:43 PM
When you use print, the function automatically moves the cursor position down to the next line. Try using term.write instead.
I remember that you said somewhere that using write is much better then the term.write :P/>
Just using write adds word wrap. Term.wrap doesn't. So if you want speed use term.write.