Posted 10 May 2012 - 08:52 PM
i want to make a screenlogger API so i can get whats on the screen when i want
this is the code in logger
but when i do this
bios:67 attempt to compare __lt on nil and number
this is the code in logger
local native = term.native
local term = {}
term.write = function (text)
native.write(text)
end
term.clear = function ()
native.clear()
end
term.clearLine = function ()
native.clearLine()
end
term.getCursorPos = function ()
native.getCursorPos()
end
term.setCursorPos = function (x,y)
xpos=x
ypos=y
native.setCursorPos(x,y)
end
term.setCursorBlink = function (:)/>/>
native.setCursorBlink(:)/>/>
end
term.getSize = function ()
native.getSize()
end
term.scroll = function (n)
native.scroll(n)
end
function getLogger()
return term
end
but when i do this
os.loadAPI("logger")
term.redirect(logger.getLogger())
i get an errorbios:67 attempt to compare __lt on nil and number