Hello, I am having a problem with linebreaking.
I want to make a code someone wrote for a terminal to display on a 3x3 monitor. Everything is working except for 1 thing, in terminals you can do print() and it skips a line similar to like clicking the ENTER key I tried it with mon.write() it didnt work. I am quite new to coding i tried messing with variables so it would do mon.setCursorPos (1,(Variable Name)+1) but then it would get stuck at the second line.
Thanks for your time
Monitor - Linebreaking
Started by GhostOmar, Sep 22 2012 09:26 AM
5 replies to this topic
#1
Posted 22 September 2012 - 09:26 AM
#2
Posted 22 September 2012 - 09:32 AM
term.redirect(peripheral.wrap("right"))
print("Hello World!")
print("Im a new line")
print("I am one too")
More info: http://computercraft...itle=Term_(API)
#3
Posted 22 September 2012 - 11:45 AM
Or you can do:
n is a linebreak in LUA.
term.redirect(peripheral.wrap("right"))
print("I'm line 1!nI'm line 2!nI'm another line!")
n is a linebreak in LUA.
#4
Posted 22 September 2012 - 01:26 PM
How can i linebreak with monitor api? mon.write("n") isnt a linebreak help please
#5
Posted 22 September 2012 - 01:39 PM
bump
#6
Posted 22 September 2012 - 02:12 PM
You can't. There's already 2 solutions to your problem posted.
Please don't bump post so soon, there's simply no need, especially not when you've been answered....
Please don't bump post so soon, there's simply no need, especially not when you've been answered....
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











