I’ve built a game (C#, UWP, Monogame) and want to integrate it with Xbox Live SDK (Microsoft.Xbox.Live.SDK.WinRT.UWP
from NuGet).
Already got auth working but experiencing some problems with StatisticManager
/Leaderboard
.
What exactly am I doing:
Add user with
StatisticManager.AddLocalUser(user)
and wait forStatisticEventType.LocalUserAdded
event fromDoWork
Save score with
StatisticManager.SetStatisticNumberData(user, leaderboardName, data)
and wait forStatisticEventType.StatisticUpdateComplete
event fromDoWork
Get the leaderboard with
StatisticManager.GetLeaderboard(user, leaderboardName, query)
and wait forStatisticEventType.GetLeaderboardComplete
event fromDoWork
On step 3 I get a C++ exception:
“Not found (404)”.
[This looks very similar to this issue](Exceptions and Error 404 when using StatsManager ).
So I’ve already checked the sandbox ID, config file and leaderboard ID but still get the same result.
I did capture the traffic from HTTP monitoring and I see URL like:
"https://leaderboards.xboxlive.com/scids/{scid}/leaderboards/stat({leaderboardId})?xuid={myXboxId}&maxItems=5"
under development, you must change your Xbox SANDBOX from RETAIL to {your sandbox} using XboxLiveTools (you can find it in github). after published you can switch it back to RETAIL,and if there is no data in leaderboard return result with zero row no exception throw
I fixed the same problem by myself