Oh yeah, I remember this.
It says the default limit is 10…
…but what it actually sends when you don't set it yourself is zero.
So you're actually getting the best “0” scoreboard entries.
Set the limit to something reasonable, and it should be okay.
public void LoadScore(string period)
{
var getScores = new io.newgrounds.components.ScoreBoard.getScores();
getScores.id = thenumber;
getScores.period = period;
getScores.social = false;
getScores.limit = 25;
getScores.callWith(ngioCore, OnScoresLoaded);
}
Also, you probably want to display the username rather than the "object" itself, so you need to get the name:
text += $" – {score.user.name} {score.value}";
Otherwise, you end up with this:
At 11/14/21 11:19 AM, Dsiak wrote:
The upload score is working fine but the in game score display is broken, can someone review my code and see what could possible be wrong? Thanks in advance.
Oh yeah, I remember this.
It says the default limit is 10…
…but what it actually sends when you don't set it yourself is zero.
So you're actually getting the best “0” scoreboard entries.
Set the limit to something reasonable, and it should be okay.
public void LoadScore(string period)
{
var getScores = new io.newgrounds.components.ScoreBoard.getScores();
getScores.id = thenumber;
getScores.period = period;
getScores.social = false;
getScores.limit = 25;
getScores.callWith(ngioCore, OnScoresLoaded);
}
Also, you probably want to display the username rather than the "object" itself, so you need to get the name:
text += $" – {score.user.name} {score.value}";
Otherwise, you end up with this: