I'm new to Lua and I don't know how to leave a blank line with nothing on when printing words onto a computer screen (for example in a list, leaving a line)...
Help would be appreciated!
How do I leave a blank line?
Started by DeadlyLazy, Dec 16 2013 01:17 PM
4 replies to this topic
#1
Posted 16 December 2013 - 01:17 PM
#2
Posted 16 December 2013 - 01:53 PM
Change the cursor position.
If you need the screen to scroll, you'll have to add that in yourself. That code will move the cursor as long as it's at least two lines above the bottom of the screen.
--# get current cursor position. local x, y = term.getCursorPos() --# set cursor position to the beginning of the line two down. term.setCursorPos(1, y + 2)
If you need the screen to scroll, you'll have to add that in yourself. That code will move the cursor as long as it's at least two lines above the bottom of the screen.
#3
Posted 16 December 2013 - 09:18 PM
If you're making a simple console application, doing
print("") works as well.
#5
Posted 16 December 2013 - 10:46 PM
Yes it does Symmetryc, or at least in the base Lua it did.
I used it a lot in some basic scripts.
I used it a lot in some basic scripts.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users












