# Match\_join\_attempt's "metadata" parameter is emtpy

**URL:** <https://forum.heroiclabs.com/t/match-join-attempts-metadata-parameter-is-emtpy/3036>\
**Category:** Runtime Framework\
**Tags:** server-framework, sdk-godot, lua\
**Created:** [September 12, 2022, 3:47pm UTC](https://forum.heroiclabs.com/t/match-join-attempts-metadata-parameter-is-emtpy/3036 "2022-09-12T15:47:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RogLeite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/rogleite/32/1317_2.png) [@RogLeite](https://forum.heroiclabs.com/u/RogLeite)\
**Post date:** [September 12, 2022, 3:47pm UTC](https://forum.heroiclabs.com/t/match-join-attempts-metadata-parameter-is-emtpy/3036/1 "2022-09-12T15:47:22Z")

</div>

My Client’s request to join a match has it’s field “metadata” properly defined, **but** the parameter “metadata” received by the handler “match\_join\_attempt” is a empty table.

1. Versions: Nakama 3.5, Docker, Godot (SDK) and 3.4
2. Server Framework Runtime language Lua

In GDScript, the call to join\_match\_async (variable `is_master` is `true`):

```auto
var match_join_result: NakamaRTAPI.Match = yield(_socket.join_match_async(_world_id, {"is_master" : is_master}), "completed")

```

The Client’s debug message regarding the request sent. The “metadata” has it’s expected value:

```auto
=== Nakama : DEBUG === Sending async request: MatchJoin<match_id=[...].nakama1, token=Null, metadata={is_master:True}>

```

In the Lua Server Runtime’s match\_join\_attempt handler, when printing every key/value pair of the parameter ` metadata`, the table is empty:

```auto
local function metadata2string(metadata)
    local txt = {"{ "}
    for k, v in pairs(metadata) do
        txt[#txt+1] = table.concat({" [",k," = ",v,"]"})
    end
    txt[#txt+1] = " }"
    return table.concat(txt)
end

[...]

function world_control.match_join_attempt( context, dispatcher, tick, state, presence, metadata )
 nakama.logger_debug(metadata2string) -- prints only "{ }"

```

---

<div class="post-metadata">

**Author:** ![RogLeite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/rogleite/32/1317_2.png) [@RogLeite](https://forum.heroiclabs.com/u/RogLeite)\
**Post date:** [September 12, 2022, 9:45pm UTC](https://forum.heroiclabs.com/t/match-join-attempts-metadata-parameter-is-emtpy/3036/3 "2022-09-12T21:45:50Z")

</div>

The value in every key/value pair of the metadata table can only be of type String.

In [runtime\_lua\_match\_core.go : line 296](https://github.com/heroiclabs/nakama/blob/7207ede0052905349e7b2970fb5fec53fd23be4c/server/runtime_lua_match_core.go#L296) the value is treated only as String:

```auto
metadataTable.RawSetString(k, lua.LString(v))

```

After I changed the type of the entries in my metadata to `String`, the `metadata` table arrived correctly in the `match_join_attempt` handler.
