Posted 02 September 2012 - 05:17 AM
here is the code
here is my error
idk y but it is makeing the code show up funny where all the # are
local w,h = term.getSize()
local function printCentered(str, ypos)
term.setCursorPos(w/2 - #str/2, ypos)
term.write(str)
end
local function printRight(str, ypos)
term.setCursorPos(w - #str, ypos)
term.write(str)
end
function Clear(x,y)
term.clear()
term.setCursorPos(x, y)
end
function idList()
if not fs.exists("server/ids.txt") then
local file = io.open("/request.txt", "w")
file:write("{ }")
file:close()
end
local file = io.open("server/ids.txt", "r")
sNames = file:read()
file:close()
requestList = textutils.unserialize(sNames)
end
function Clear()
term.clear()
term.setCursorPos(1, 1)
printCentered("Private Server", 1)
Pos(1, 2)
print(" #################################################")--2
print(" # #")--3
print(" # #")--4
print(" # #")--5 here
print(" # #")--6
print(" # #")--7
print(" # #")--8
print(" # #")--9
print(" # #")--10
print(" # #")--11
print(" # #")--12
print(" # #")--13
print(" # #")--14
print(" # #")--15
print(" # #")--16 here
print(" # #")--17
print(" #################################################")--18
-- 12345678911111111112222222222333333333344444444445
-- 01234567890123456789012345678901234567890
--Length = 50
--Hight = 18
--center = 26,9
--Pos(19,1)
--print("Private Server")
Pos(1,19)
end
Clear()
idList()
local num = table.maxn(requestList)
shell.run("clear")
Pos(3,3)
for i=1,num do
write(requestList[i]..",")
end
here is my error
textutils:165: attempt to concatenate string and nil
idk y but it is makeing the code show up funny where all the # are