Posted 18 February 2013 - 03:34 PM
I've been trying to get my ASCII text to print centered on a monitor but I can't even get it to print to the monitor in general at all. Here's my code.
Thanks for your help!!!
local monitor = peripheral.wrap("right")
term.redirect(monitor)
local e,j = term.getSize()
local function printCentered(str, ypos)
term.setCursorPos(e/2 - #str/2+1, ypos)
term.write()
end
local function title()
term.clear()
term.setCursorPos(1,2)
mon.print(" _____ _ __ _ _")
mon.print("/__ \ |__ ___ / _\ |__ (_)_ __ ____")
mon.print(" / /\/ '_ \ / _ \ \ \| _ \| | '__/ _ \"")
mon.print(" / / | | | | __/ _\ \ | | | | | | __/")
mon.print(" \/ |_| |_|\___| \__/_| |_|_|_| \___|")
end
term.restore()
Thanks for your help!!!