iteration

This commit is contained in:
Layla 2023-10-07 23:52:54 -04:00
parent 268e92d12a
commit 7fcae7b276
2 changed files with 8 additions and 2 deletions

View File

@ -18,6 +18,12 @@ rednet.send(receiverID, data)
while true do
id, msg = rednet.receive()
if id == receiverID then
io.write(msg .. "\n")
if msg == nil then
print("Hostname not found!")
break
else
io.write(msg .. "\n")
break
end
end
end

View File

@ -48,7 +48,7 @@ while true do
-- check if hostname in data
if request.hostname == nil then
rednet.send(client_id, "not found")
rednet.send(client_id, nil)
else
rednet.send(client_id, data[request.hostname])
end