question

Scott Jennings avatar image
Scott Jennings asked

Issue with initial virtual currency value being applied twice.

The initial virtual currency amount is being applied twice for some of our users. We noticed an issue where some players had double the amount of VC on start as they should have. When investigating the issue I noticed two events depositing the initial amount of VC into their account at the same time, first the initial deposit (0 to initial deposit amount) and then a second deposit (initial deposit amount to 2x initial deposit amount).

One of the common factors between some of the users experiencing this issue is that they were just coming back to the game after an extended break of a month or more.

Is this a bug? Any advice or help on the cause or prevention of this issue would be appreciated!

10 |1200

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

1 Answer

·
Seth Du avatar image
Seth Du answered

PlayFab is based on RESTful API which means one API call will only get one result, either success or failure. There should not be doubled API calls caused by PlayFab. If you notice there are 2 events in the PlayStream, it should be because something triggers your functions to grant twice. My suggestions is to double check the VC application related codes and try to reproduce it. In addition, make sure some verification process is implemented before VC is granted.

5 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.

Scott Jennings avatar image Scott Jennings commented ·

Hey SethDu,

Thank you for your response. I am seeing two events happening within a few milliseconds of one another shortly after the user logs in. When I expand the details for those events I see that "application" in the "PlayFabEnvironment" object shows "mainserver" for both of the events while our custom CloudScript events that alter VC show "mainservercloudscriptint" as the application type.

We are using the LoginWithSteamRequest method provided in the PlayFabClientModels script and receive two login events "player_logged_in" event and "entity_logged_in". Is it possible that PlayFab would grant the initial VC value twice? Since this logic is handled by PlayFab it is difficult to reproduce and difficult to implement any verification.

Thanks again, and any information on the issue is welcome.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Scott Jennings commented ·

Sorry, may I ask how do you grant VC? I thought you were granting it via Cloud Script Functions or Rule Actions. Do you mean the Initial deposit that you defined in the Currencies page?

In addition, please also provide us with your title ID so that we may dig into it.

0 Likes 0 ·
Scott Jennings avatar image Scott Jennings Seth Du ♦ commented ·

Yes, sorry I did mean the initial deposit found on the currencies page. The title id is "D544".

0 Likes 0 ·
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.