Posted 21 August 2017 - 03:34 AM
Sorry, this is going to be hard to explain.
So I was working on a re-write of HSH (remote shell program), when I stumbled across something weird..
I had called the read() function in a separate window, e.g.
Any ideas on why this is? If needed I can supply the whole code, just didn't think it would be worth you reading 500 lines or so..
EDIT: I figured something out…There's a separate coroutine that's running a separate shell and the second character of those 2 is calling another read() function (so you can run a program). I realised this because it had auto-completion for 'label' and other programs..
So I was working on a re-write of HSH (remote shell program), when I stumbled across something weird..
I had called the read() function in a separate window, e.g.
local w = window.create(term.current()..)
term.redirect(w)
local _i = read()
And for some reason it was taking 2 of the first character I put in, e.g. if I entered '5' it would put in '55' and then wouldn't happen again, it was only for the first character put in. Not to mention after I had exited the read() function (pressed 'Enter') it would break the program and error out. Except there was no error (It's running in a coroutine so the coroutine just reports as dead, no error :/ ).Any ideas on why this is? If needed I can supply the whole code, just didn't think it would be worth you reading 500 lines or so..
EDIT: I figured something out…There's a separate coroutine that's running a separate shell and the second character of those 2 is calling another read() function (so you can run a program). I realised this because it had auto-completion for 'label' and other programs..
Edited on 21 August 2017 - 01:37 AM