Posted 22 March 2015 - 02:12 AM
I've been working on a buffer API, but it's having issues.
It looks totally messed up and crashes for some reason, and I can't figure out why.
It's decently large(~250 lines) and requires one of my APIs. Run these two commands:
I'm using this code to test it:
Edit: I've fixed the crashing thanks to Blomb Bloke, but now when I run "help" while running the shell in my buffer, it says,
"bios:150:Redirect object is missing method getSize", even though running term.getSize() in lua is fine.
Edit2: I've fixed this buffer system.
Thanks for your help!
It looks totally messed up and crashes for some reason, and I can't figure out why.
It's decently large(~250 lines) and requires one of my APIs. Run these two commands:
pastebin run 6JU1nY50 4 update
pastebin get KuZcEbnz buffer
I'm using this code to test it:
shell.run'clear'
os.loadAPI"library/buffer"
local buf = buffer.newBuf(51,19)
buf.makeActive(1,1)
local na = term.current()
term.redirect(buf)
--term.getCursorPos()
term.setCursorBlink(true)
term.setCursorPos(1,1)
--print("Hi")
shell.run'shell'
--sleep(2)
--print"Bye!"
--sleep(2)
--read()
--term.redirect(na)
--b.blit(1,1)
Edit: I've fixed the crashing thanks to Blomb Bloke, but now when I run "help" while running the shell in my buffer, it says,
"bios:150:Redirect object is missing method getSize", even though running term.getSize() in lua is fine.
Edit2: I've fixed this buffer system.
Thanks for your help!
Edited on 25 March 2015 - 01:50 AM