Closed Cyteon closed 5 months ago
If I understand the documentation at https://heroiclabs.com/docs/nakama/concepts/multiplayer/relayed/#create-a-match correctly:
Users can optionally provide a name when creating a new match. This name is used to generate the match ID, meaning two players creating matches with the same name will end up with identical match IDs and, as a result, in the same match.
The name
parameter does not set the match label but leads to a predictable match_id
. To set the label you have use the server side scripting and an authoritative match.
Thanks, I'm currently storing the marchid as a key in a collection. Listing storage objects and iteratinging through them until it finds a key matching the marchid. This is not the best way as it has to iterate on that list for each match. Do you know of any better way?
That depends on what you are trying to do. Find a match id via a label or listing all open matches and their labels? You can get good advice on the Heroiclabs forum at https://forum.heroiclabs.com/ it would be best if you asked your question there.
I want to list matches and their ids. But thanks
Creating lobby snippet:
gameMatch = await Global.socket.create_match_async("test")
Doing m.label returns null, i can verify it has fetched the match correctly as i can do m.match_id and m.size