Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

GPGS Leaderboard scores are "centered" instead of "top"
Started by info142 Feb 05 2020 09:02 AM

3 replies to this topic
gpgs leaderboard centered top score
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

info142

[GLOBAL: userInfoPane.html]
info142
  • Observer

  • 26 posts
  • Corona SDK

Hi, there!

 

I have a strange problem. I'm trying to retrieve top scores (top ten) from my leaderboard, but instead of top positions, I'm getting "centered" scores. As you can see, position = "top", but scores are always centered around player's score, that means that it is no possible to get the top scores. For example in a leaderboard we have 50 results, a player is placed at 25, so the code will provideds results from places #20 to #30, instead of #1-10. But the 'position' parameter is "top"! I'm confused:)

 

I'm using plugin.gpgs.v2. Here is my code:

			gpgs.leaderboards.loadScores(
			{
				leaderboardId = "*******",
				position = "top",
				timeSpan = "all time",
				reload=true,
				limit=10,
				
				listener=function(event)
				
					DebugConsole("*Scores*")
				
					if not event.isError then
					
							for i=1,#event.scores do
						
							DebugConsole(event.scores[i].score)

						end	
					
					end
				
				end
				
			})
			


[TOPIC: post.html]
#2

info142

[GLOBAL: userInfoPane.html]
info142
  • Observer

  • 26 posts
  • Corona SDK

My tests have shown that position = "top" and position = "centered" (as well using a default value) provide the same results. It seems that parameter position is not relevant anymore in that sence (but position = "single" works properly). So it is impossible to get a top score. So these examples work the same (but they should not), all of them loads a 'centered' score, not the top one.

-- Example A

gpgs.leaderboards.loadScores(
{
  leaderboardId = "*******",
  position = "top",
  listener=loadListener
				
})

-- Example B

gpgs.leaderboards.loadScores(
{
  leaderboardId = "*******",
  position = "centered",
  listener=loadListener
				
})

-- Example C

gpgs.leaderboards.loadScores(
{
  leaderboardId = "*******",
  listener=loadListener
				
})


[TOPIC: post.html]
#3

info142

[GLOBAL: userInfoPane.html]
info142
  • Observer

  • 26 posts
  • Corona SDK

Have anyone experienced the same problem? Is there no way to get a top score from a leaderboard based on Google Play Game Services in Corona? Why does the position parameter not work?



[TOPIC: post.html]
#4

santiagojrodriguez

[GLOBAL: userInfoPane.html]
santiagojrodriguez
  • Observer

  • 14 posts
  • Corona SDK

Hi! I'm having the exact same issue.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: gpgs, leaderboard, centered, top, score