Posted 24 March 2013 - 08:42 AM
Hello
I have a problem. If I use this code:
Thanks
Sorry for bad english
I have a problem. If I use this code:
connect = function()
print("Opening rednet...")
for _,s in ipairs(rs.getSides()) do
if peripheral.isPresent(s) and peripheral.getType(s) == "modem" then
rednet.open(s)
return true
end
end
print("No modem found")
print("F7 to reboot")
function rawread()
while true do
local sEvent, param = os.pullEvent("key")
if sEvent == "key" then
if param == 65 then
os.reboot()
end
end
end
end
end
connect()
args = {...}
if #args > 0 and #args < 2 then
rednet.send(tonumber(args[1]), "rechat_server_join")
local serverId, serverMessage, serverDistance = rednet.receive(10)
if serverId == arg1 and serverMessage == rechat_join_okay then
print("Server online")
run()
else
print("No response")
end
else
print("Usage: <serverid>")
end
The computer doen't send a message to args[1].Thanks
Sorry for bad english