iteration
This commit is contained in:
		@ -28,14 +28,19 @@ rednet.send(receiverID, data)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
while true do
 | 
					while true do
 | 
				
			||||||
    id, msg = rednet.receive()
 | 
					    id, msg = rednet.receive()
 | 
				
			||||||
    if msg == "ok" then
 | 
					    if id == receiverID then
 | 
				
			||||||
        print("Registered with LNS Server Successfully!")
 | 
					        if msg == "ok" then
 | 
				
			||||||
        break
 | 
					            print("Registered with LNS Server Successfully!")
 | 
				
			||||||
    end
 | 
					            break
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            print("Failed to register with LNS Server! Error: " .. msg)
 | 
				
			||||||
 | 
					            break
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    -- timeout after 5 seconds
 | 
					        -- timeout after 5 seconds
 | 
				
			||||||
    if os.time() - current_time > 5 then
 | 
					        if os.time() - current_time > 5 then
 | 
				
			||||||
        print("Failed to register with LNS Server! Timeout!")
 | 
					            print("Failed to register with LNS Server! Timeout!")
 | 
				
			||||||
        break
 | 
					            break
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
		Reference in New Issue
	
	Block a user