Type Table Library gamecircle.* Revision Release 2025.3721 Keywords achievement, return, value, table
Table that encapulates the error values and return values from the GetPercentileRanks function.
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)