question

matias avatar image
matias asked

Initial deposit Triggering all the time

What title says if i close my game, and open it again the initial deposit is sent again.

So you can stack a lot of currency just by closing and opening the game multiple times. Any idea whats happening?

In-Game Economy
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.

Kaream mohamad avatar image Kaream mohamad commented ·

thank you at all

0 Likes 0 ·

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

The initial deposit you mentioned is in the virtual currency edit page or did you implement it yourself? And is the problem with only one account? If so, can you provide your title id and the player account for us to research. Otherwise, can you provide the game start code snippet and the initial deposit function code snippet if it is your own implementation of the initial deposit logic for us to research.

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

matias avatar image matias commented ·

- The initial deposit is from the virtual currency edit page.

- No, The problem is not restricted to one account only

- Title ID is: 8EF74

I've 2 codes for the initialization (it happens in both)

This one i use for loggin in platforms like unity (I use it mostly for internal testing)

var request = new LoginWithCustomIDRequest
                {
                    CreateAccount = true,
                    CustomId = SystemInfo.deviceUniqueIdentifier
                };


                PlayFabClientAPI
                   .LoginWithCustomID(request, OnLogginSuccess, OnError);

I will add a part 2 since i have char limit

0 Likes 0 ·
matias avatar image matias commented ·

Part 2:

This code is the one i use to sign in with play games. If the user sign in previously with that device use the LoginWithAndroidDeviceIDRequest which looks similar to the code from the part 1

 public void SignInWithPlayGames()
    {
        PlayGamesPlatform.Instance.Authenticate((success) =>
        {
            if (success == SignInStatus.Success)
            {
                string authCode;


                PlayGamesPlatform.Instance.RequestServerSideAccess(true, code =>
                {
                    authCode = code;


                    var request = new LoginWithGooglePlayGamesServicesRequest
                    {
                        TitleId = PlayFabSettings.TitleId,
                        ServerAuthCode = authCode,
                        CreateAccount = true,
                        InfoRequestParameters = new GetPlayerCombinedInfoRequestParams
                        {
                            GetPlayerProfile = true
                        }
                    };

                    PlayFabClientAPI.LoginWithGooglePlayGamesServices(request, OnFirstLoginAndroid, OnError);
                });
            }
        });
    }
0 Likes 0 ·
Xiao Zha avatar image Xiao Zha matias commented ·

Your login code appears to be correct. You can try to change the value of the initial deposit to confirm whether the change in the VC balance is caused by the initial deposit. And because the amount of the player's virtual currency balance changes, there will be corresponding events. You can view the "Player virtual currency balance changed" event on the PlayStream Monitor page or the Data->Data Explorer page to see if any other logic (like Rules or CloudScript) changes the VC.

0 Likes 0 ·
matias avatar image matias Xiao Zha commented ·

Fixed: Set the initial Deposit to 0 then back to 10 + Updating the SDK, looks like it fixed the problem

1 Like 1 ·

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.