gamecircle.Leaderboard.PercentileItem

Type Table
Library gamecircle.*
Revision Release 2024.3703
Keywords achievement

Overview

A representation of the statistical percentile data returned by GameCircle SDK for some functions.

Properties

Example

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)