我无法在排行榜上提交分数。另外,我对javascript很陌生,所以我不知道如何捕获setScoreAsync抛出的错误
FBInstant.getLeaderboardAsync('global'( .then(function(leaderboard( { 返回 leaderboard.setScoreAsync(gameManager.highscore(; }) .then(function(entry( { console.log(entry.getScore(((;42 console.log(entry.getPlayer((.getName(((; } });
请帮助我。
您需要
在开发人员仪表板中配置"全局"排行榜(将"使排行榜上下文相关"选项设置为"否"(。用:
.catch(function (err)
{
console.log(err);
});
用于捕获错误,与 .then(( 相同