类型 表格 代码库 gamecircle.* 版本 发行 2024.3703 关键字 成就、返回、值、表格
封装 GetPercentileRanks 函数中的错误值和返回值的表格。
local leaderboardId = "myFirstLeaderboard" local gamecircle = require("plugin.gamecircle") gamecircle.Init(false, true, false) function LeaderboardCallback(returnValue) if returnValue.isError == true then print("Get Percentile request returned with error message: " .. returnValue.errorMessage) else print("Percentile information returned for leaderboard " .. returnValue.leaderboard.name) print("The local user's index in the list is : " .. returnValue.userIndex) print("-(-1 means user is not on leaderboard)") print("Here is the statistical information:") for i,stat in ipairs(returnValue) do print("#" .. i .. " " .. stat.playerAlias .. "-" .. stat.playerScore .. "-" .. percentile) end end end gamecircle.Leaderboard.GetPercentileRanks(leaderboardId, "GLOBAL_WEEK", LeaderboardCallback)