This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
cheekycharlie101's profile picture

HELP i need help with computer craft moniters.

Started by cheekycharlie101, 01 August 2012 - 07:17 AM
cheekycharlie101 #1
Posted 01 August 2012 - 09:17 AM
ok so i love playing tekkit and started getting into computer craft. im still a complete noob but can make very basic things like pass protected doors. for example:
edit tekkit
print ("pass accepted")
sleep (2)
redstone.setOutput ("left", true)
sleep (5)
redstone.setOutput ("left",false)
os.reboot()

this is just about how far i have got with computer craft and as you can see its very basic. anyway, too my problem. ive just started using moniters and i can do stuff like the following. make a program that prints text and run it on the moniter.
like the big moniter would say "Welcome To My Tekkit server" but my problem his is how do i change how big the text
is????. i really cant find any info on this and if someone could help me out i would be very greatful! thanks :ph34r:/>/>
–cheeky
p.s sorry if this is in the wrong thread, its my first post so i wasent sure where to post it
Kolpa #2
Posted 01 August 2012 - 09:46 AM
thread woud be ask a pro :)/>/> and the code is pretty advanced and probably nothing that you did before it goes like this

moni = peripheral.wrap("side of monitor")
moni.setTextScale(smallest 0.5 biggest 5)
moni.write("text that you want to display")
if you still have questions feel free to ask :ph34r:/>/>
cheekycharlie101 #3
Posted 01 August 2012 - 09:48 AM
Thanks so much, ive been wanting this for ages

-=[Edit]=-
i put in the following code:
moni = peripheral.wrap("right")
moni.setTextScale(smallest 0.5 biggest 5)
moni.write("cobble factory contorl")
i put this into a program called Console and typed
moniter right Console
i then got this error:
bios:206: [string "Console"]:2: ')' expected
bios:206: [string "Console"]:2: ')' expected
bios:206: [string "Console"]:2: ')' expected
please help, im not sure what this means as i dont know much about lua
Kolpa #4
Posted 01 August 2012 - 10:20 AM
you did not set the text scale to anything

moni.setTextScale(smallest 0.5 biggest 5)
u have to set it to a number between 0.5 and 5
and also do not call this on a monitor just run it as a normal "program"
cheekycharlie101 #5
Posted 01 August 2012 - 10:22 AM
ohh, thanks so much for your help. :ph34r:/>/>
Kolpa #6
Posted 01 August 2012 - 10:23 AM
you're welcome
cheekycharlie101 #7
Posted 01 August 2012 - 10:24 AM
ok thanks soooo much it works. one last thing, would you know a line of code that would allow me to center the text into the middle of the screen and i also need a way to insert a line break so the part of the text appearts on the first line and the rest on the second. if you could tell me how to do these last 2 things it would be awesome thanks:D
Kolpa #8
Posted 01 August 2012 - 11:30 AM
just look at this API doc it shoud clarificate anything :ph34r:/>/> http://www.computercraft.info/wiki/index.php?title=Peripheral_(API)#Monitor