How do i submit custom name to leaderboard?

I’m trying to make a leaderboard like 3D car coinhunt, where players can enter a name when they’re not logged in.

The score submitted to the leaderboard should be attached to the name entered in the text field.

What’s happening is that submitting a score without logging in (from a different computer, sharing the file) submits as “anonymous player” and the computer linked to my gdevelop account has been submitting it under my gdevelop username regardless of what i input.

I changed the code to hardcode submit only either “this” or “that” but gdevelop is somehow bypassing it to put in my username directly.

Is there a way to let users submit to the leaderboard under a custom name?

name input:
image

modified code:

what’s happening:

It looks like you fill the variable with the input content after the entry has been sent to the leaderboard.

but i dont call the PlayerName variable in the score submission line, i send the name “that” or “this”

or does it still use the player name variable somehow?

Ah okay I see it and I can reproduce the problem in a new project.
Looks like it works like the other Save score action which is supposed to do that with the authentication name.
When I published my game there was no authentication yet, that’s why it works there.

1 Like

oh, yikes. Does that mean there’s no fix for it? :smiling_face_with_tear:

And do we need a bug report for this?

I actually suspect you are logged in.
There is definitely an “unwanted” auto login at every preview start now, in GD and maybe also on gdGames. If I explicitly log out, I can send a custom name.

If you are logged in, the username is always used.
(For whatever reason there are two different actions)

oh! it managed to send the custom name when logged out like you said. (because of my code it was sent as “that”, but that means the code works!)

its weird that gdevelop is forcing the logged-in account name to be submitted, but i guess my issue is …solved? :melting_face:

Thanks for the help!

1 Like

Jup.

I found the switch in the preferences to not be logged in automatically.
01

1 Like

thats great thanks! :+1: :+1:

Maybe some other ideas. I have the same problem, the leaderboard only saves my gd login. Logging out didn’t help.