This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
lieudusty's profile picture

Term.redirect problems

Started by lieudusty, 02 November 2012 - 10:47 AM
lieudusty #1
Posted 02 November 2012 - 11:47 AM
I'm having a lot of trouble getting this to work. I get a bios error when running it.

remote = {}
function remote.write(text)
  rednet.send(1, text)
end
term.redirect(text)
print("Hello")
I was thinking this would work but it doesn't work at all! Can someone please help? I've been stuck on this for hours…
EDIT: When I use term.write("Hello") insted of print("Hello") it works but somehow when using term.redirect and using print gives me a bios error.
EDIT: MysticT was right! I didn't define all the term APIs therefore my code doesn't work. Thanks for the response!
ChunLing #2
Posted 02 November 2012 - 12:07 PM
What's the error and what are you trying to do?
lieudusty #3
Posted 02 November 2012 - 12:08 PM
What's the error and what are you trying to do?
I'm trying to redirect my terminal through rednet to another computer. I get an error on line 32 in the bios.
MysticT #4
Posted 02 November 2012 - 12:16 PM
You need to provide all the term functions in the table (setCursorPos, getCursorPos, getSize, setCursorBlink, etc).
ElvishJerricco #5
Posted 02 November 2012 - 12:44 PM
First off, you're trying to redirect to a nil variable called text when i'm sure you meant to redirect to remote. Second, the remote has to have every single function that the term api has, except of course the restore function.