41 posts
Posted 08 September 2012 - 12:58 AM
so im trying to display text on a screen
but it wont show multiple lines
it shows it all in one line can someone help me
code:
http://gyazo.com/6ef4dc01a1a5514f652793eb45a057b5
209 posts
Location
In your fridge.
Posted 08 September 2012 - 01:03 AM
If you want multiple lines, try mon.print "test" you may or may not need parenthesis, I rarely work with monitors.
864 posts
Location
Sometime.
Posted 08 September 2012 - 01:03 AM
mon.write("textn")
n means newline in lua.
55 posts
Location
Everywhere.
Posted 08 September 2012 - 01:03 AM
I have this issue too, never figured out how to solve…
864 posts
Location
Sometime.
Posted 08 September 2012 - 01:03 AM
If you want multiple lines, try mon.print "test" you may or may not need parenthesis, I rarely work with monitors.
Check your references before posting.
WikiThis won't work.
41 posts
Posted 08 September 2012 - 01:07 AM
mon.write("textn")
n means newline in lua.
That doesnt work
http://i.imgur.com/B6ST0.pnghttp://i.imgur.com/DjA0Z.png
55 posts
Location
Everywhere.
Posted 08 September 2012 - 01:07 AM
Nor does n /n or *angryrage*
Any other ideas?
EDIT: Found it! mon.setCursorPos(1,[nextline]) with move it to what ever line [nextline] is, and writing will apear there.
NOTE: you must replace nextline, its no magic.
252 posts
Posted 08 September 2012 - 01:08 AM
Put this before your code…
THEN remove the mon. before ALL the writes, then replace the writes with print()
Insert the code below above your code. That should redirect text to the TOP monitor!
- I got the code off of this forum, it's not mine :3.
local side = "top" -- change this
if peripheral.getType(side) ~= "monitor" then
print("No monitor on that side")
return -- Neatly exits the program
else
local monitor = peripheral.wrap(side)
term.redirect(monitor)
end
864 posts
Location
Sometime.
Posted 08 September 2012 - 01:08 AM
mon.write("textn")
n means newline in lua.
That doesnt work
http://i.imgur.com/B6ST0.png
Pic of screen? Does it give error?
Try doing multiple lines?
mon.write("Textn")
mon.write("Textn")
41 posts
Posted 08 September 2012 - 01:09 AM
mon.write("textn")
n means newline in lua.
That doesnt work
http://i.imgur.com/B6ST0.png
Pic of screen? Does it give error?
Try doing multiple lines?
mon.write("Textn")
mon.write("Textn")
i already tried that
864 posts
Location
Sometime.
Posted 08 September 2012 - 01:10 AM
Okay..
Then just do
term.redirect(mon)
print("text")
print("text")
term.restore()
209 posts
Location
In your fridge.
Posted 08 September 2012 - 01:45 AM
If you want multiple lines, try mon.print "test" you may or may not need parenthesis, I rarely work with monitors.
Check your references before posting.
WikiThis won't work.
My apologies. I assumed it worked the same as on the terminals, just blown up. Argue amongst yourselves, I don't know enough about monitors, apparently.