Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printList = {}
- local w,h = term.getSize()
- for y = 1,h do
- printList[y] = nil
- end
- local console = window.create(term.native(),w/2,1,w,h/2)
- local lines = 0
- function log(words)
- lines = lines + 1
- printList[lines] = {words,colors.white,colors.black}
- end
- function logError(words)
- lines = lines + 1
- printList[lines] = {words,colors.red,colors.black}
- end
- function display(mod)
- term.clear()
- for i=1 + mod, h + mod do
- if printList[i] then
- term.setCursorPos(1,i)
- term.setTextColor(printList[i][2])
- console.write(printList[i][1])
- end
- end
- end
- log('random')
- log('even more randomness')
- logError('randomERrRor')
- for i,v in pairs(printList) do
- print(i,": ",v)
- if type(v) == "table" then
- print("table")
- for i=1,#v do
- print(": ",v[i])
- end
- end
- end
- display(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement