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 Icolino · Nov 07, 2019 at 04:49 PM · Player DatadataTitle Data

How can I be sure that player will have its data, imediately after login if I am using playstreamevent?

Hi, I am using cloudscript to start the player with some default data.

But it seems that data is sometimes there and sometimes it isn't there on player login success.

I get the result back from a callback to get the data to the device.

But the result is there most of the time, sometimes it is null.

Could be that the event player_added_title is sometimes to slow so that my login passes through but the event still hasn't happened?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Citrus Yan · Nov 08, 2019 at 05:48 AM

Hi @Icolino,

Looks like you’ve set up a rule triggered by the player_added_title event that will run a Cloud Script function to set some default data for the player, and you were trying to get the default data of that player in the OnLoginSuccess callback from the client, is that right? If that’s the case, there are many possible reasons for that:

  1. The player_added_title event delayed, however, it should be generated in real-time in most cases.
  2. The Cloud Script function wasn’t completed when you request the default data for that player.
  3. The Cloud Script completed, however, the data of that player wasn’t fully updated in the backend server.

Will you be able to retrieve that data after few retries?

Comment

People who like this

0 Show 2 · 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 Icolino · Nov 08, 2019 at 08:52 AM 0
Share

Hi, thanks for a fast answer.

Those 3 were my guesses as well.

Andl yes I am able to retrieve the data after a few tries, mostly after a second try. I was just thinking if I am doing it correctly and should I be worried if there are too many calls to the playfab when I repeat the data retrieval to my game?

avatar image Citrus Yan Icolino · Nov 08, 2019 at 09:00 AM 0
Share

Hi,

Yes, you should control the frequencies of those calls, Exponential backoff (for instance, retries after 1s, 2s, 4s, 8s, ...)is a great way to avoid hitting the request rate.

avatar image

Answer by Brandon Phillips · Nov 07, 2019 at 07:16 PM

I have this same issue, too

Comment

People who like this

0 Show 0 · 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

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

    How to setup Player Data and change player data in Azure Function 4 Answers

    Cloudscript update player data only for not existing keys 0 Answers

    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

    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