Sign In
Register
Getting Started
Documentation
Tutorials
API Documentation
SDK Center
Tips & Tricks
Forums
Support
How can we help you today?
Enter your search term here...
Search
Login
to submit a new ticket
Check ticket status
Start a new topic
Discussions
GameSparks Forums
Questions and Answers
Leaderboard data request.
J
Jonathan Peplow
started a topic
over 3 years ago
Hi,
I'm attempting to get 100+ entries from a leaderboard (should only contain 6-7):
new GameSparks.Api.Requests.LeaderboardDataRequest()
.SetLeaderboardShortCode("SCORE_LEADERBOARD").SetEntryCount(100).Send((response) =>
{
if (!response.HasErrors)
{
GSEnumerable<GameSparks.Api.Responses.LeaderboardDataResponse._LeaderboardData>
adsa = response.Data;
foreach (GameSparks.Api.Responses.LeaderboardDataResponse._LeaderboardData entry in response.Data)
{
int rank = (int)entry.Rank;
string playerName = entry.UserName;
string score = entry.JSONData["SCORE"].ToString();
Debug.Log("Rank:" + rank + " Name:" + playerName + " \n Score:" + score);
}
}
else
{
Debug.Log("Error Retrieving Leaderboard Data...");
}
});
However, the data I get back only contains 4 entries. Why is this please?
Thanks.
Login
to post a comment
More topics in
Questions and Answers
Documentation Notes
Design issues with user events
Using NoSQL
Runtime Collections vs Metadata Collections
Anonymous authentication from browser app
Modules
Movement With Unity
Problem with url parameters for downloadables
Querying NoSql GameSparks database
Challenge accesType
See all 2487 topics
Jonathan Peplow
.SetLeaderboardShortCode("SCORE_LEADERBOARD").SetEntryCount(100).Send((response) =>
{
if (!response.HasErrors)
{
GSEnumerable<GameSparks.Api.Responses.LeaderboardDataResponse._LeaderboardData>
adsa = response.Data;
foreach (GameSparks.Api.Responses.LeaderboardDataResponse._LeaderboardData entry in response.Data)
{
int rank = (int)entry.Rank;
string playerName = entry.UserName;
string score = entry.JSONData["SCORE"].ToString();
Debug.Log("Rank:" + rank + " Name:" + playerName + " \n Score:" + score);
}
}
else
{
Debug.Log("Error Retrieving Leaderboard Data...");
}
});