Posted 15 November 2014 - 09:56 PM
I was Playing in LuaLand Server, and I've builded a Big Turtle for a Store. So I wanted to make a Rolling Text:
-- Config --
monitor = "monitor_38"
text = "The Orange Turtle, the Store of GOGEL and TODTSOFTWARES items!"
slow = 2
-- Functions --
x, y = term.getSize()
function printCentered(value, height) -- For Simple GUI
local xpos = math.floor(x/2 - string.len(value)/2)
if height == nil then
local cX, cY = term.getCursorPos()
height = cY
end
term.setCursorPos(xpos, height)
term.write(value)
end
-- Simple GUI for PC --
term.setBackgroundColor(colors.white)
term.setTextColor(colors.black)
term.clear()
printCentered("Text Panel by Buildman",math.floor(y/2))
print()
-- Program --
m = peripheral.wrap(monitor)
m.setTextScale(5)
t = text.." "
i = 0
while true do
if i == #t then i = 0 end
i = i + 1
m.write(string.sub(t, i))
sleep(slow)
end
But It don't works. Help?