Есчо вопрос. вот функции:
Отдачи на клиенте
Function Join(ipadress$)
order="join..."
WriteLine stream,order
WriteLine stream,GetMyIP()
ip=Int_IP(ipadress$)
SendUDPMsg stream,ip,53424
End Function
и приема на сервере:
Function Reception()
If RecvUDPMsg(stream) Then
order=ReadLine$(stream)
If order="join..." Then
p.Player=New Player
p\ip=Int_IP(ReadLine$(stream))
EndIf
EndIf
End Function
Function Int_IP(IP$)
d1%=Left(IP$,Instr(IP$,".")-1):IP$=Right(IP$,Len(IP$)-Instr(IP$,"."))
d2%=Left(IP$,Instr(IP$,".")-1):IP$=Right(IP$,Len(IP$)-Instr(IP$,"."))
d3%=Left(IP$,Instr(IP$,".")-1):IP$=Right(IP$,Len(IP$)-Instr(IP$,"."))
d4%=IP$
Return (d1 Shl 24) + (d2 Shl 16) + (d3 Shl 8 ) +d4
End Function
While Not KeyDown(1)
Cls
For p.Player=Each Player
Print DottedIP$(p\ip)
Next
Reception()
Wend
Работать не хочет, не выполняет это:
For p.Player=Each Player
Print DottedIP$(p\ip)
Next