Creating (or getting access to) match_id, created by matchmaker

Hi. There are my first steps. I would like to have match_id in any rpc function with context.

context.match_id return nil - in nakama console matches I see match_id. How can I get access for it?

I tried to create match_id manually in match_init, but this function isn’t invoke - probably because I use matchmaker. I don’t see any informations about it in docs.

@michal14 the match_id is only available in the context of an authoritative match, to create an authoritative match with the matchmaker matched callback have a look at: Nakama: Authoritative Multiplayer | Heroic Labs Documentation.

You need to either use the hook to return the match_id to connected client listening to matchmaker matched message so that it can use the id to join the created match, or you can use a custom RPC (see an example here: GitHub - heroiclabs/nakama-project-template: An example project on how to set up and write custom server code in Nakama server.)

Hope this helps.