question

icolino avatar image
icolino asked

UpdateUserTitleDisplayName not working as intended

 While calling this function display names get overwritten even if there are duplicates, 	which I am trying to avoid.

 While if I try to do the same from Playfab directly, display names can't get
 overwritten if there are duplicates. I didn't allow for the option in Playfab either.



 PlayFabClientAPI.UpdateUserTitleDisplayName(new UpdateUserTitleDisplayNameRequest

 {DisplayName = name },
                 

OnDisplayName => {
                     Debug.Log(OnDisplayName.DisplayName + " is your display name");
                 }, 

errorCallback => {
                     Debug.Log(errorCallback.ErrorMessage + " error with display name, possibly in use");
                 });

snip.png (4.7 KiB)
snip2.png (11.9 KiB)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

icolino avatar image icolino commented ·

Oh my mistake in setting all the text as code. Hope you can read it clearly.

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

I have tried it on my testing title. If the "Allow non-unique player display names" is not checked, I cannot update a duplicated display name via either API or Game Manager.

What's the Title ID and Player ID you are testing?

8 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

icolino avatar image icolino commented ·

Thank you very much for you help. I think I got it from here. I will contact you if I need some more support. <3

1 Like 1 ·
icolino avatar image icolino commented ·

Band of Feathers

E4372

This is the Title ID. And for a player ID, it doesn't matter which one it is (I was using this one ABD819BF4F2B5DD8). I can't update it through Playfab Game Manager which is good.

But somehow through API, it allows the change. Strangely.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ icolino commented ·

Are you sure that the Display Name you input is existing in your Title? I have created a test account in your title and try to update via API, with an existed name I notice, which is "Darko". It returns:

{
    "code": 400,
    "status": "BadRequest",
    "error": "NameNotAvailable",
    "errorCode": 1058,
    "errorMessage": "Name not available"
}


Which is the expected behavior.

Can you provide more reproduction scenario?

0 Likes 0 ·
icolino avatar image icolino Seth Du ♦ commented ·

snip2.png darkosnip.png Here I changed it through the game and it changed my current player to Darko as well. But I tried it as well with changing to your test player name and it didn't work. I got the correct error there.

0 Likes 0 ·
snip2.png (40.9 KiB)
darkosnip.png (19.2 KiB)
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.