Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No callback on steamUserStats.GetLeaderboardEntries #421

Closed
mitchelvk opened this issue Jul 29, 2017 · 1 comment
Closed

No callback on steamUserStats.GetLeaderboardEntries #421

mitchelvk opened this issue Jul 29, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@mitchelvk
Copy link

Hello everyone,

I'm trying to obtain the leaderboard entries for Age of Empires II: HD Edition. I used Nethook2 Dump Analyzer to find out what the game does. When you launch the game, it retrieves a few leaderboard entries as well, as you can see here:

https://pasteboard.co/GD5Asfu.png

After logging in on Steam, I call this method to retrieve the leaderboard ID for the RM leaderboard. This name is also being used by the game, and I do receive a callback on this:

steamUserStats.CreateLeaderboard(221380, "LEADERBOARD_RM", ELeaderboardSortMethod.Ascending, ELeaderboardDisplayType.Numeric);

Then I handle the callback as follows:

static void OnFindOrCreateLeaderboard(SteamUserStats.FindOrCreateLeaderboardCallback callback) { steamUserStats.GetLeaderboardEntries(221380, callback.ID, -4, 4, ELeaderboardDataRequest.Global); }

The strange thing is, when I change any of the GetLeaderboardEntries arguments in a way that it will result in 0 entries, I do get a response. This for example does give me a response

static void OnFindOrCreateLeaderboard(SteamUserStats.FindOrCreateLeaderboardCallback callback) { steamUserStats.GetLeaderboardEntries(221380, callback.ID, 0, 0, ELeaderboardDataRequest.Global); }

As soon as there are more than 0 entry results, I don't get a callback anymore. Do any of you know why this is and if/how I can solve that?

This is how I handle the callback:

static void OnLeaderboardEntries(SteamUserStats.LeaderboardEntriesCallback callback) { Console.WriteLine("LB entries response"); }

@yaakov-h yaakov-h self-assigned this Jul 31, 2017
@yaakov-h yaakov-h added the bug label Jul 31, 2017
@yaakov-h yaakov-h added this to the 2.0.0 milestone Jul 31, 2017
@yaakov-h
Copy link
Member

yaakov-h commented Jul 31, 2017

Do any of you know why this is and if/how I can solve that?

Now we do. 😄

If you enable DebugLog (see sample 3), you can see that there was an exception occurring when building the callback object. This was caught and logged, but no callback could be posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants