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

rednet.open is not working

Started by craftminer, 03 August 2012 - 11:58 AM
craftminer #1
Posted 03 August 2012 - 01:58 PM
Hi does anyone know how i can fix this error:
Lyqyd #2
Posted 03 August 2012 - 03:06 PM
Type in just 'rednet' and see what it says. I would expect it would look something like:


lua> rednet
nil
lua>

If it does say nil, the rednet API isn't loading or isn't present.
MysticT #3
Posted 03 August 2012 - 09:11 PM
Actually, it should say something like:

lua> rednet
table: <some numbers>
lua>
But I think that it will say:

lua> rednet
function: <some numbers>
lua>
because the error says "attempt to index ? (a function value)". Maybe you defined a function called rednet in some program or in the lua prompt. Reboot the computer and it should work, then try to find where rednet was overwriten.
reallycrazyBailey #4
Posted 04 August 2012 - 12:31 AM
Ive had that error before all I did was change it from rednet.open("left") to rednet.open"left" and it worked
Lyqyd #5
Posted 04 August 2012 - 01:09 AM
Actually, it should say something like:

lua> rednet
table: <some numbers>
lua>
But I think that it will say:

lua> rednet
function: <some numbers>
lua>
because the error says "attempt to index ? (a function value)". Maybe you defined a function called rednet in some program or in the lua prompt. Reboot the computer and it should work, then try to find where rednet was overwriten.

Whoops. That's what I get for trying to answer questions on here from my phone. Don't know how I got nil and function switched around, but I did say that that's what I would expect, not what it should be. :P/>/>