Public Sub SyncPlayerList() 'this reads the Player type and adds them all to the playerlist.
Dim b As Long '
Dim iX As Integer
frmMain.lvPlayerList.ListItems.Clear
players(MyID).Name = frmMain.txtMyName.Text 'insert my name into playerlist type
players(MyID).ID = MyID 'insert my id into the playerlist type
For b = LBound(players) To UBound(players) 'cycle through playerlist type
If Len(players(b).Name) > 0 Then
Server.curPlayers = b + 1
Set itmx = frmMain.lvPlayerList.ListItems.Add(, , players(b).ID)
itmx.SubItems(1) = players(b).Name
itmx.SubItems(2) = players(b).Score
itmx.SubItems(3) = players(b).Ping
players(b).lListIndex = frmMain.lvPlayerList.ListItems.Count - 1
End If
Next b
End Sub