Hi there,
Is there a better way to update user metadata than doing the way shown in docs (passing all arguments to pcall)?
(I only want to update metada for a given user)
And i’d like to know if metada is a good place to save something like ELO Ranking?
local nk = require("nakama")
local user_id = "4ec4f126-3f9d-11e7-84ef-b7c182b36521" -- some user's id.
local metadata = {}
local username = "my-new-username"
local display_name = "My new Name"
local timezone = nil
local location = "San Francisco"
local lang_tag = nil
local avatar_url = "http://graph.facebook.com/avatar_url"
local status, err = pcall(nk.account_update_id, metadata, username, display_name, timezone, location, lang_tag, avatar_url)
if (not status) then
nk.logger_info(("Account update error: %q"):format(err))
end
Thanks