# Missing player presences when joining a match

**URL:** <https://forum.heroiclabs.com/t/missing-player-presences-when-joining-a-match/4575>\
**Category:** Client Libraries\
**Tags:** sdk-godot\
**Created:** [November 9, 2023, 6:49pm UTC](https://forum.heroiclabs.com/t/missing-player-presences-when-joining-a-match/4575 "2023-11-09T18:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Firemanarg](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@Firemanarg](https://forum.heroiclabs.com/u/Firemanarg)\
**Post date:** [November 9, 2023, 6:49pm UTC](https://forum.heroiclabs.com/t/missing-player-presences-when-joining-a-match/4575/1 "2023-11-09T18:49:46Z")

</div>

Hi!

I’m implementing a match lobby system (for configuring match settings) before the match start. I’m trying to list all players in a match, but the problem is that only the first player receives all the presences:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/8/87f66f195fa2d05b8852ca70008ac1cfd7162ea2.png)

I also tried to put a button to manually update the match players, but apparently the match object isn’t getting synced.

```go
func update_players_list() -> void:
    item_list_players.clear()
    if GlobalData.match_ == null:
        return
    var presences: Array = [GlobalData.match_.self_user]
    presences.append_array(GlobalData.match_.presences)
    for presence in presences:
        item_list_players.add_item(
            presence.username, null, false
        )

func _on_received_match_presence(match_presence: NakamaRTAPI.MatchPresenceEvent) -> void:
    print("Received Match Presence: ", match_presence) # DEBUG
    update_players_list()

```

Both match and match\_ticket objects are declared in a singleton ‘global\_data.gd’:

```js
# global_data.gd

@onready var match_: NakamaRTAPI.Match = null
@onready var matchmaker_ticket: NakamaRTAPI.MatchmakerTicket = null

```

Another implementation (with the same result) was putting an array at the singleton, then updating every player presence event:

```go
func update_players_list() -> void:
	item_list_players.clear()
	for presence in GlobalData.match_presences:
		item_list_players.add_item(presence.username, null, false)

func _on_received_match_presence(match_presence: NakamaRTAPI.MatchPresenceEvent) -> void:
	print("Received Match Presence: ", match_presence) # DEBUG
	for presence in match_presence.joins:
		if not presence in GlobalData.match_presences:
			GlobalData.match_presences.append(presence)
	for presence in match_presence.leaves:
		if presence in GlobalData.match_presences:
			GlobalData.match_presences.erase(presence)
	update_players_list()

```

```js
# global_data.gd

@onready var match_presences: Array[NakamaRTAPI.UserPresence] = []

```

How can I fix my code? Is there a better way to do that?
