Why can't I get a match metadata / state outside its handler?

Title say it all, is it possible to do it? I noticed none match function will return its metadata/state, nor in client or server, its only accessible inside the match handler.

I’m trying to get this working because I’m currently storing the match info (such as name, password, etc.) inside its state, so I wanted this state outside the match handler to display it on a lobby browser, is it correct? Should I really use the nakama storage for this? How would I assign nakama storage entries with the match listing function to display if the match has a password or not to the client

There are many reason why match state data shouldn’t be outputed anywhere else, but match itself. But for your case if you wanted to list:

Then you can make an rpc or use nk.match_list with query to fetch based on it :slight_smile:

3 Likes