gamecircle.Leaderboard.LeaderboardsReturn

Type Table
Library gamecircle.*
Revision Release 2022.3683
Keywords achievement, return, value, table

Overview

Table that encapulates the error values and return values from the GetLeaderboards function.

Properties

Example

local gamecircle = require("plugin.gamecircle")  
gamecircle.Init(false, true, false)  
function LeaderboardCallback(returnValue)  
    if returnValue.isError == true then  
        print("Get Leaderboards request returned with error message: " .. returnValue.errorMessage)  
    else  
        print("Leaderboard information recieved!")  
        print("-num" .. returnValue.num)  
        for i, leaderboard in ipairs(returnValue) do  
            print("-Leaderboard ID" .. leaderboard.id)  
            print("--name" .. leaderboard.name)  
            print("--displayText" .. leaderboard.displayText)  
            print("--scoreFormat" .. leaderboard.scoreFormat)  
            print("--imageURL" .. leaderboard.imageURL)  
            print("--imageURL may be blank, as warned by Amazon's SDK documentation, when propegated outside basic GetLeaderboards function")  
        end  
    end  
end  
gamecircle.Leaderboard.GetLeaderboards(LeaderboardCallback)