Modem.isWireless

From ComputerCraft Wiki
Jump to: navigation, search
Grid Redstone.png  Function modem.isWireless
Returns true if a modem is wireless, false if it's wired.
Syntax modem.isWireless()
Returns boolean is modem wireless?
Part of ComputerCraft
API Modem

Examples

Grid paper.png  Example
Prints whether the modem on top of the computer is wireless or wired.
Code
local modem = peripheral.wrap("top")

if modem.isWireless() then
  print("The modem on top of the computer is wireless.")
else
  print("The modem on top of the computer is wired.")
end
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox