This is what I have been going off of.
Rednet Basic Part 1
I believe these two areas are what the error message is talking about, but I am not sure.
PC1
for i, side in ipairs(rs.getSides()) do --#Loop for each side on the computer that redstone can be used, these can also be used by modems.
if peripheral.getType(side) == 'modem' then --#Did we find a modem... Or some other peripheral?
print('Found Modem On Side '..side.."!")
rednet.open(side)
wireless = peripheral.wrap(side)
break --#Opened modem, dont open any others.
end
end
function waitForMessage(displayMessage)
local sender, message, protocol = rednet.receive()
if displayMessage then print(message) else return message end
end
waitForMessage(true)
PC2
for i, side in ipairs(rs.getSides()) do --#Loop for each side on the computer that redstone can be used, these can also be used by modems.
if peripheral.getType(side) == 'modem' then --#Did we find a modem... Or some other peripheral?
print('Found Modem On Side '..side.."!")
rednet.open(side)
wireless = peripheral.wrap(side)
break --#Opened modem, dont open any others.
end
end
function sendMessage(destination, message, protocol)
if destination and message then
rednet.send(destination, message, protocol)
end
end
sendMessage(7, 'hey')
The computer that is waiting for the message is running fine, however the computer sending the message keeps giving me
bios:14: [string ".temp"]:2: ')' expected
Perhaps, I am biting off a bit more than I can chew at the moment for I am so new at computercraft.
Thank You
Raz