The tutorial only mentioned getting data from normal leaderboard
new LeaderboardDataRequest_highScore().SetEntryCount(10).Send((response) => { ...
This request sends shortcode "highScore", how can i create a Request with shortcode "highScore.level.1" ?
Thanks!
Best Answer
K
Kenneth Rougeau
said
over 5 years ago
Okay, so after a bit of trial and error, poking and prodding, I think I may have worked it out... I haven't tested it yet as I'm in the middle of gutting my game and retooling it (switching from Parse to Gamesparks), which means little at all is working fully again yet. That said, here's what appears to be the correct formatting. Please, oh please, correct me if I'm wrong here. In the example below, I have a partitioned Leaderboard with a shortcode of levelScores, organized by by an int number with the shortcode of level (set in my postScores event). For the sake of the example, I'm only gathering the first 10 high scores for level 1. Anyway, I hope that it's correct, and I hope that this information, if correct, will assist others over this particular pitfall in the future.
new LeaderboardDataRequest().SetLeaderboardShortCode("levelScores.level.1").SetEntryCount(10).Send((response) =>
{
// Your code for dealing with scores here...
});
I actually came here looking for this precise information and was quite dismayed after searching through several pages of posts to see that, not only has the issue not been addressed here after several months, but that the answer doesn't seem to have been raised or addressed elsewhere either. I'll continue my search for the proper formatting, but would certainly appreciate it if someone would chime in with the appropriate information, just in case I can't locate it elsewhere. Thanks!
K
Kenneth Rougeau
said
over 5 years ago
Answer
Okay, so after a bit of trial and error, poking and prodding, I think I may have worked it out... I haven't tested it yet as I'm in the middle of gutting my game and retooling it (switching from Parse to Gamesparks), which means little at all is working fully again yet. That said, here's what appears to be the correct formatting. Please, oh please, correct me if I'm wrong here. In the example below, I have a partitioned Leaderboard with a shortcode of levelScores, organized by by an int number with the shortcode of level (set in my postScores event). For the sake of the example, I'm only gathering the first 10 high scores for level 1. Anyway, I hope that it's correct, and I hope that this information, if correct, will assist others over this particular pitfall in the future.
new LeaderboardDataRequest().SetLeaderboardShortCode("levelScores.level.1").SetEntryCount(10).Send((response) =>
{
// Your code for dealing with scores here...
});
Customer Support
said
over 5 years ago
Hi Kenneth,
Sorry we missed this post, we'll be going over the forums this week and marking as many posts "answered" as possible and answer those we missed ourselves.
You are correct, the reason you must use the default LeaderboardDataRequest is because when you get your "Custom SDK" from Unity we could only provide you with the partitions that have been created already, if a player never makes it to level 200 for example, that partition will not exist and we wont know to compensate for it and add that to the code.
Shane
K
Kenneth Rougeau
said
over 5 years ago
Thanks so much for your quick response, at least to my own inquiry ;) I'm sure you fine folks are hard at work and I most certainly appreciate it. I'm glad to know that I did indeed trip upon the correct answer. I'm having some trouble wrapping my head around certain aspects of the way things work here on GameSparks, but am doing my best. At the moment, I'm scratching my head trying to figure out how to simply store and retrieve values for other types of data. It's not relevant to this particular question, of course, so I'll post my own thread if I can't find the proper way of accomplishing some of these seemingly simple tasks. Thanks again & keep up the great work!
Khanh Nguyen
I am creating a Leaderboard with partition on level, and try to get leaderboard data in Unity
In Test Harness, I can get high score for level1 by using this query
The tutorial only mentioned getting data from normal leaderboard
This request sends shortcode "highScore", how can i create a Request with shortcode "highScore.level.1" ?
Thanks!
Okay, so after a bit of trial and error, poking and prodding, I think I may have worked it out... I haven't tested it yet as I'm in the middle of gutting my game and retooling it (switching from Parse to Gamesparks), which means little at all is working fully again yet. That said, here's what appears to be the correct formatting. Please, oh please, correct me if I'm wrong here. In the example below, I have a partitioned Leaderboard with a shortcode of levelScores, organized by by an int number with the shortcode of level (set in my postScores event). For the sake of the example, I'm only gathering the first 10 high scores for level 1. Anyway, I hope that it's correct, and I hope that this information, if correct, will assist others over this particular pitfall in the future.
1 person has this question
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstKenneth Rougeau
Kenneth Rougeau
Okay, so after a bit of trial and error, poking and prodding, I think I may have worked it out... I haven't tested it yet as I'm in the middle of gutting my game and retooling it (switching from Parse to Gamesparks), which means little at all is working fully again yet. That said, here's what appears to be the correct formatting. Please, oh please, correct me if I'm wrong here. In the example below, I have a partitioned Leaderboard with a shortcode of levelScores, organized by by an int number with the shortcode of level (set in my postScores event). For the sake of the example, I'm only gathering the first 10 high scores for level 1. Anyway, I hope that it's correct, and I hope that this information, if correct, will assist others over this particular pitfall in the future.
Customer Support
Hi Kenneth,
Sorry we missed this post, we'll be going over the forums this week and marking as many posts "answered" as possible and answer those we missed ourselves.
You are correct, the reason you must use the default LeaderboardDataRequest is because when you get your "Custom SDK" from Unity we could only provide you with the partitions that have been created already, if a player never makes it to level 200 for example, that partition will not exist and we wont know to compensate for it and add that to the code.
Shane
Kenneth Rougeau
-
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 2486 topics