Leaderboards
#
Read more about the Leaderboards system in Hiro here.
Get all leaderboards
#
Get the leaderboards defined for the game.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| void onLeaderboardConfigGet(const Hiro::LeaderboardConfigList& leaderboardConfigList)
{
for (auto it = leaderboardConfigList.leaderboardConfigs.begin(); it != leaderboardConfigList.leaderboardConfigs.end(); it++)
{
std::cout << "Found leaderboard: " << it->id << '\n';
}
}
void onError(const Nakama::NError& error)
{
std::cout << Nakama::toString(error.code) << ": " << error.message << '\n';
}
hiroClient->leaderboardsConfigGet(session, onLeaderboardConfigGet, onError);
|