UDP Multiplayer

Blitz3D Forums/Blitz3D Programming/UDP Multiplayer

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hello
What is wrong with this code?
Global NumberofPlayers = 1;Input("How many players are there?")
Dim IPAdress(NumberofPlayers)
IPAdress(1) = 1921680101
Variable$ = "Hello World!"
Stream = CreateUDPStream(828)
NewStream = CreateUDPStream(0)
WriteString(Stream,Variable)
Broadcast(Stream,828)
RecvUDPMsg(NewStream)
String1$ = ReadString(NewStream)
Print String1
WaitKey
End


Function Broadcast(Message,Port);Message is the stream that is being broadcasted.  Port is the Destination Port.
Write"Testing..."
For Loop = 1 To NumberofPlayers
SendUDPMsg Message,IPAdress(Loop),Port

Next
Print"done."
End Function

When I run this, the ReadString Function doesn't return anything. Please point out any mistakes with it.