This is the script i'm using. What I want to do is output text to a 4 x 1 set of monitors, I want the text centered and scaled in size. However, i'm not sure why this script is not working...no error message, nothing. Any ideas?
Code:
local tText = {
"text"
}
local sSide = "back"
local nTextSize = 3 -- change the text size here (from 1 to 5)
local function printCenter(mon, t)
local w, h = mon.getSize()
local y = math.floor((h / 2) - (#t / 2)) - 1
for i, line in ipairs(t) do
local x = math.floor((w / 2) - (#line / 2))
mon.setCursorPos(x, y + i)
mon.write(line)
end
end
local mon = peripheral.wrap(sSide)
mon.setTextScale(nTextSize)
printCenter(mon, tText)