Posted 22 January 2013 - 09:51 AM
Ok, basically I am making a computer with all the names of staff for a server I am op on. I class myself as a pretty decent programmer but I can not get this program to work. What I want is the text below to scroll from the very bottom of the mon to the top then repeat. It works fine when running on the terminal but not on the 7x6 Monitor. The first couple of lines of text will be printed but it wont scroll. Any help would be much appreciated. Here is my code:
If it makes a difference I am using computercraft version 1.4.1 in the latest build of tekkit classic.
Thx again for any help.
It also does not give me an error, it just keeps running until I terminate it or restart the computer.
If any more info is needed just ask
mon = peripheral.wrap("back")
screen = {
" Staff List",
" ------------",
" ",
"--------------------------------------------------------------",
" Owner:",
" ",
" Ph3r",
"--------------------------------------------------------------",
" Op:",
" ",
" mike546378",
" Fonrus",
"--------------------------------------------------------------",
" Admin:",
" ",
" Aplracer1",
" O_lee25",
" Dakurlzz",
" Forest1989",
"--------------------------------------------------------------",
" GMod: (Global Moderator)",
" ",
" ",
"--------------------------------------------------------------",
" Mod++:",
" ",
" xxxxXKyleXxxxx",
" Mymineingz",
"--------------------------------------------------------------",
" Mod:",
" ",
" yoyo2324",
"--------------------------------------------------------------",
" M.I.T (Mod In Training)",
" ",
" Muffinxl",
"--------------------------------------------------------------",
" Donator:",
" ",
" mike546378 ",
"--------------------------------------------------------------",
}
x, y = mon.getSize()
scroll = -25
local function draw()
for z = scroll - y, scroll + y do
print(screen[z])
end
end
draw()
for i = 1,60 do
scroll = scroll + 1
sleep(0.5)
print(screen[z])
draw()
end
shell.run("monitor", "back", "mon2")
If it makes a difference I am using computercraft version 1.4.1 in the latest build of tekkit classic.
Thx again for any help.
It also does not give me an error, it just keeps running until I terminate it or restart the computer.
If any more info is needed just ask