Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Mahnoor Naeem · Aug 03, 2019 at 09:20 PM · Player DataTitle Data

I am entering Player Data(title) from unity. It accepts string as value. But only numbers in string else it Invalid Input Error. Can you please help? I cannot store alphanumeric data in player data field.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Mahnoor Naeem · Aug 06, 2019 at 02:58 PM

I guess I found the answer, I mistakenly tick marked above condition in API Features. which demanded me to put correct json in Data.

Sorry for the trouble.

And thankyou for your time and help.


answer.png (111.2 kB)
Comment

People who like this

0 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Roshaan · Aug 07, 2019 at 05:53 AM 1
Share

@Mahnoor Naeem oh that didn't came into my mind.

That's great that now your problem is resolved :)

And sure no problem. Have a great day!

avatar image

Answer by Brandon Phillips · Aug 04, 2019 at 05:22 AM

Can you post your code and the exact error you're getting?

Comment

People who like this

0 Show 7 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mahnoor Naeem · Aug 04, 2019 at 10:35 AM 0
Share

this is the code

PlayFabServerAPI.UpdateUserReadOnlyData(

new PlayFab.ServerModels.UpdateUserDataRequest { PlayFabId = agentID, Data = new Dictionary<string, string>() { {"MyPlayers", "mahnoor"}, },

Permission = PlayFab.ServerModels.UserDataPermission.Public },

result => { Debug.Log("Data Updated"); },

error => {

Debug.Log( error.ErrorMessage);

} ) ;

This is the error I get:

Invalid input parameters UnityEngine.Debug:Log(Object)

But if I replace "mahnoor" with some numbers like "236438" then data will be updated.

avatar image Roshaan Mahnoor Naeem · Aug 04, 2019 at 11:54 AM 0
Share

@Mahnoor Naeem Can you please post the playfab error code?

avatar image Mahnoor Naeem Roshaan · Aug 04, 2019 at 01:00 PM 0
Share

The value for key MyPlayers was not valid JSON.

this is the error I got from error detail

I dont know the error code, but http code is 400.

Show more comments
avatar image

Answer by Mahnoor Naeem · Aug 05, 2019 at 10:29 AM

These errors are given by your code above.

As far as I tested it, it only accepts numbers in string.Because even in your code when I entered "1234556" as value, it got updated. as below.


error.png (39.5 kB)
ss.png (15.3 kB)
Comment

People who like this

0 Show 15 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mahnoor Naeem · Aug 05, 2019 at 10:30 AM 0
Share
@Roshaan

..

.

avatar image Roshaan Mahnoor Naeem · Aug 05, 2019 at 12:33 PM 1
Share

@Mahnoor Naeem
Let me check this and get back to you. To me it's very strange.

avatar image Roshaan · Aug 05, 2019 at 12:38 PM 0
Share
@Mahnoor Naeem

The same code is working for me. Can you please share your own code so I could test it on my end and see if it's working

avatar image Roshaan Roshaan · Aug 05, 2019 at 12:46 PM 0
Share

@Mahnoor Naeem
I used your own code mentioned in the first comment and it's working for me.

I am attaching a screenshot too and I tried to enter two values "123456" & "mahnoor" both can be seen in the picture that they are inserted successfully

screenshot-2019-08-05-at-54028-pm.png (20.2 kB)
avatar image Mahnoor Naeem Roshaan · Aug 05, 2019 at 12:58 PM 0
Share

I used same code as you posted. Mine is also posted above that.

avatar image Roshaan Mahnoor Naeem · Aug 05, 2019 at 01:02 PM 0
Share

@Mahnoor Naeem

I have used your code and it's working See the above comment

Show more comments
Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Data Access of Other Players 1 Answer

    KeyNotFoundException: The given key was not present in the dictionary. 1 Answer

    Non-sharded title data or query of player data? 1 Answer

    Create Title Data for specific Segment. 1 Answer

    UserData Questions 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges