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

Wireless modem API

Started by Bugscz, 16 June 2014 - 05:14 AM
Bugscz #1
Posted 16 June 2014 - 07:14 AM
Hey guys, I wanna send message from one computer to another via wireless modem.

I created two programs - server and client side. But at server side it still says startup:8: attempt to call nil

I am pretty sure that 8th line is OK. What do you think?

Check it out here:
Server: http://pastebin.com/EJrw8fMG
Client: http://pastebin.com/u61DH5y4
theoriginalbit #2
Posted 16 June 2014 - 07:29 AM
what this means is that you're trying to wrap the modem on the left, but there isn't anything on the left side of the computer.

if you're using ComputerCraft 1.6 or above you could use the peripheral.find function, it will return a wrapped modem no matter the side

local modem = peripheral.find( "modem" )
this does even return wired modems, if you want to make sure its a wireless modem you can use the filter function.

local modem = peripheral.find( "modem", function( name, obj ) return obj.isWireless() end)
Edited by