I am new to Computer Craft, and I want to get started using Wireless Modems.
local modem = peripheral.wrap("top")
local channel = 1
modem.open(channel)
I have the code above, and when I try to run the modem.open()
command, it gives me a message saying "attempt to call index ? (a nil value)". I know that many people have had this error before. I have searched through questions and tutorials and followed their exact code or instructions, but none of them have worked and I cannot find any other questions with this error message showing up from this command. My modem is on top of my computer.
How can this be fixed?