local index_domains = {
[1] = "2",
[2] = "www.domain.com",
[3] = "www.guggle.com"
}
print(textutils.serialise(index_domains))
rednet.open("top")
while true do
id,message = rednet.receive()
print("---------------------------------------")
print(id.." "..message)
if message == nil then
--Do Nothn'
print("nil")
else
print("For loop INIT...")
local send_stat = false
for i=1,#index_domains do
print("For loop at:"..i)
print("val = "..index_domains[i])
if (index_domains[i] == message) then
rednet.send(id,i)
print("Send: "..i)
send_stat = true
break
else
end
end
if (send_stat == false) then
rednet.send(id,"false")
print("Send: FALSE")
end
end
end
Comments