Someone gifted MetalSlayer69 supporter status!
We need you on the team, too.
Support Newgrounds and get tons of perks for just $2.99!
Create a Free Account and then..
Become a Supporter!At 10/11/20 02:11 PM, RaIix wrote:At 10/10/20 09:42 PM, MayChant wrote: Hi. I'm trying to add a scoreboard to my game (in Unity3D). I created the scoreboard and made API calls to post and get scores from the same scoreboard. The post score requests always had a successful status, yet I never get any scores from the get request. I can get the scoreboard object itself but the array I get is always empty. I tried to get with period="A" and with period being left out (which defaulted to "D"), and neither way worked. I was testing it in preview mode, if that's relevant.I tried it and ran into the same issue as you ("success" with an empty list), even though the code seemed OK to me.
I don't know if the parameters sometimes behave weirdly or if it was my fault (most likely the latter) but after a few attempts, I ended up with this parameter combination which worked with both live and a (different) preview scoreboard.
(You don't have to use the event; I just use it to feed the scores into a text field.)
Handle results:
Live scoreboard test:
Preview (incremental) scoreboard test:
You can see the sample if you add Ngio as a package or just the code here.
That worked, thanks! Seems like I was missing either social = false (which is weird because the user should be able to see their own score anyway) or limit = 10 (which was the default according to the documentation so maybe it's a bug?). How did you do the live leaderboard testing though?
At 10/11/20 02:11 PM, RaIix wrote:At 10/10/20 09:42 PM, MayChant wrote: Hi. I'm trying to add a scoreboard to my game (in Unity3D). I created the scoreboard and made API calls to post and get scores from the same scoreboard. The post score requests always had a successful status, yet I never get any scores from the get request. I can get the scoreboard object itself but the array I get is always empty. I tried to get with period="A" and with period being left out (which defaulted to "D"), and neither way worked. I was testing it in preview mode, if that's relevant.I tried it and ran into the same issue as you ("success" with an empty list), even though the code seemed OK to me.
I don't know if the parameters sometimes behave weirdly or if it was my fault (most likely the latter) but after a few attempts, I ended up with this parameter combination which worked with both live and a (different) preview scoreboard.
(You don't have to use the event; I just use it to feed the scores into a text field.)
Handle results:
Live scoreboard test:
Preview (incremental) scoreboard test:
You can see the sample if you add Ngio as a package or just the code here.
That worked, thanks! Seems like I was missing either social = false (which is weird because the user should be able to see their own score anyway) or limit = 10 (which was the default according to the documentation so maybe it's a bug?). How did you do the live scoreboard testing though?