Example
local leaderboardId = "myFirstLeaderboard"
local gamecircle = require("plugin.gamecircle")
gamecircle.Init(false, true, false)
function LeaderboardCallback(returnValue)
if returnValue.isError == true then
print("Get Scores request returned with error message: " .. returnValue.errorMessage)
else
print("Score information recieved for Leaderboard!")
print("-Leaderboard ID" .. returnValue.id)
print("-name" .. returnValue.name)
print("-displayText" .. returnValue.displayText)
print("-num" .. returnValue.num)
print("-scoreFormat" .. returnValue.scoreFormat)
print("-scores:")
for i, score in ipairs(returnValue) do
print("--Rank " .. score.rank)
print("---" .. score.scoreString .. " by " .. score.player.alias)
end
end
end
gamecircle.Leaderboard.GetScores(leaderboardId, "GLOBAL_WEEK", LeaderboardCallback)