My game using matchmaking to match players together pased on their highest map they unlocked using a query proparaty called top_map
After the matchmaking find enough players it generate a match using this lua module
local nk = require(“nakama”)
local function makematch(context, matched_users)
local top_map = context. query_params[“top_map”]
local modulename = “world_control”
local setupstate = { invited = matched_users, top_map = top_map }
local matchid = nk.match_create(modulename, setupstate)
return matchid
end
nk.register_matchmaker_matched(makematch)
In my world_control module i tried to get the top_map from the sent data in the match_init and pass it to the game state like this:
function world_control.match_init(context, setupstate)
Local gamestate = {
map = setupstate. top_map
}
.
.
.
But when i use state.map later in the code it still nil i dont know whats i am doing wrong