function cPrint(message) local blarghx, blarghy = term.getCursorPos() local termX, termY = term.getSize() term.setCursorPos(termX/2 - #message, blarghy) print(message) end
Problem with cPrint
Started by nutcase84, Apr 05 2013 10:08 AM
2 replies to this topic
#1
Posted 05 April 2013 - 10:08 AM
It doesn't print it in the middle, it prints to the side. What am I doing wrong?
#2
Posted 05 April 2013 - 10:10 AM
Lemme give you a nice little function:
local x, y = term.getSize() function cPrint(str, ypos) term.setCursorPos(x/2-#str/2, ypos) term.write(str) endI use that function all the time.
#3
Posted 05 April 2013 - 10:16 AM
THANK YOU!!!!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











