Recently an error/bug has occured in my global leaderstats

  1. My game is still in progress but I found a bug which I didn’t do anything.

  2. First the picture:


    On the left is the leaderboard that should have all the ranked players, there only should be 8 players ranked.
    On the right I preformed the Donation Leaderboard to a Level-Leaderboard so that I can show the Messages and the last 2 players, which only the last 2 players should be shown on the left too.

The thing is I have gotten an Error that said:

Players:GetUserIdFromNameAsync() failed: Unknown user

and my thoughts were, I want to somehow remove the Error and wanna have my ranked players on the other leaderboard.

  1. Well what I did is what I just written above.

If anyone with knowledge can remove the uncertainty that would be much appreciated.
(Plus) Removing the “Error while loading playername” from my leaderboard!

EDIT:
I just show you what the line looks like when playername don’t show up goes through:

for		Index, Spielerdaten in ipairs(Daten) do
				
				local		Erfolg, Name							=		pcall(function()
						return	PLAYERS:GetNameFromUserIdAsync(tonumber(Spielerdaten.key))
				end)
				if		not Erfolg then
						if		not tonumber(Spielerdaten.key) then
								Name							=		Spielerdaten.key
						else
								Name							=		"Error while loading playername."
						end
				end
				local		Wert									=		Spielerdaten.value
				
				
				if		not Wert then
						continue
				end

This was the solution!

As anybody wanna know why it happend, read this post through.

The Message that appears is an Error created by me so as nothing came through but should,
the missing piece was a username for the Rank 7# and 9#. (it has nothing to do with levels)

The players that were playing my game were p1 and p2.
Who and Why were they playing coming up!

Who are they?
That are my Identical clones, not coded and not Rig’s of mine.

Why were there in my Game?
I was play testing on a Local Server in Studio and found out they got into my Leaderboard.

Until then it was too late, they got no username that means, they have never been marked on my leaderboard and killed it instantly (Well the left one the right still loads with my created Error)
but I found only one solution for this massive problem:

I renamed my DataSaveStorage
I was kinda sad that the players must Level up again but it was the only solution i had in my mind.

Well this will be marked as Solution thanks for reading so far!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.