Skip to main content

Save Score

Records a player's score and registers it in the leaderboard service. The player's score may vary slightly depending on the leaderboard recording method configured in the console.

Call Information​

public void Record (string tableCode, string recordId, double score, string extraData, PlayNANOODelegate callback)

Call Details​

ParameterDescriptionType
tableCodeTable codestring
recordIdRecord ID (e.g. Player ID)string
scoreRecord scoredouble
extraDataExtra datastring
callbackCommunication resultPlayNANOODelegate

Source Code​

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

plugin.LeaderboardManagerV20240301.Record(tableCode, recordId, score, extraData, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
}
else
{
Debug.Log("Fail");
}
});
}
}

Response​

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Status": "success"
}

Response Details​

Data KeyDescriptionType
StatusProcessing resultstring