Sending metadata when joining match with Defold (SOLVED)

@totebo Metadata passed into match join attempt must be a flat JSON object of string keys to string values. In your case the code should not be:

metadata = {
    equipped_weapon_type = 1
}

Instead it should be:

metadata = {
    equipped_weapon_type = "1"
}

This is a constraint of the API because in Protocol Buffers its exposed as a map type:

nakama-common/realtime.proto at master · heroiclabs/nakama-common · GitHub

Hope this helps.

2 Likes