Jump to content

Computer Craft Programs


TheJoker91

Recommended Posts

Posted

So recently ive been using computercraft for just mundane tasks around my base and have had great struggle on finding programs so could anyone give me a pastebin to display multiple lines of text

Posted

Isnt print for computer text?

Monitor text printing is something like mon.write("example text")

-- Example of code
m = peripheral.wrap('left')
-- This is first line\/
m.setCurosrPos(1,1)
m.write('Hello World!')
-- This is second line \/
m.setCursorPos(2,1)
m.write('Hello to you!')
Posted

If you redirect to a monitor you can use print. Imo its a much better way of doing things since you retain control of print

Posted

dont use redirect, uglee issues come up. 

 

but use this code

mon = peripheral.wrap("SIDE")
line = 1
function printt(text)
mon.setCursorPos(line,1)
mon.write(text)
line = line + 1
end
printt("INSERT TEXT IN QOUTES")
-- prints first line
printt("INSERT TEXT IN QOUTES")
-- prints second line....

and so on and so forth. Line by line. You can also make a list and sort it but contact me ingame for that. Ill be on in another  2.5 hrs

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site you agree to the following Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.