question

bbekec avatar image
bbekec asked

Duplicated Event Problem

Hello,

Today i noticed that in Playstream There were lots of events from different player IDs. For example, I have a custom event in my game "SESSIN STARTED". I see this event in same time more than one and event ids are same.

I am worry for this situation because,

In my game players purchase coins via IAP. When they purchase I add their new coins to their Virtual Currency Balances.

In my scenario, in my purchasing script, to protect ther coins to be lost while adding to Playfab account, firstly, purchased coin amount is saved to PlayerPref, after this, I try to add their balance. If adition is succesfull, then Playerprefs value is set zero again. (maybe this is a wrong method, i dont know).

I see some players have a huge amount of coins in their balance. I was supposing that this is my mistake becaue of the method mentioned above.

Today, after seeing these duplicate event in Playstream, i started to think that this can be the reason for why they have a huge amount of coin in their balance.

So, what is your opinion? Could duplicated events cause adding extra coins to their balances?

(sorry for my grammer)

Thanks

entitiesPlayer InventoryPlayStream
10 |1200

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

bbekec avatar image
bbekec answered

Thanks for reply. "Getting started with PlayFab, Unity IAP, and Android - PlayFab | Microsoft Docs" this is just for Android. I have players from both Andoid and iOS. Maybe i can perform it for Android develeopers but again i will be in need of my scenario for iOS. I made a research but i could not find any resources for iOS.

" Also to clarify, event IDs are unique, each time an event is fired a different event ID is generated. Are the duplicate IDs you're talking about the user IDs?"

*Actually, i didnt get a screenshot. i just viewed details of duplicate ones, there was '"EventId":' with same string. I will watch it again and if it happens again, i'll get deeper details and share with you.

Thanks

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.

Made Wang avatar image Made Wang commented ·

Regarding IAP for iOS and Android, all playfab does is validate the receipt and grant the purchased item. What you need to confirm is if you grant the coins manually.

Also, you can look for events and get details in Game Manager->Data->Data Explorer (basic).

0 Likes 0 ·
bbekec avatar image bbekec commented ·

Hello again, i found the problem i think. Player clicks to sign in button, while waiting response from server, the player clcks again and again to the button. This cause to repeating events in playstream. Solution to this can be deactivating button after the first click in order to prevent multiple clicks.

Is there any tutorial for IAP?

Thanks

0 Likes 0 ·
Made Wang avatar image Made Wang bbekec commented ·

I'm glad you solved this problem.

Currently, PlayFab only has IAP tutorials on Android.

0 Likes 0 ·
bbekec avatar image bbekec Made Wang commented ·

Thanks. i need this tutorial. This is a request that please prepare and publish a tutorial for ios, too.

Regards

0 Likes 0 ·
Show more comments
Made Wang avatar image
Made Wang answered

Why do you need to use PlayerPref to store coins? Referring to Getting started with PlayFab, Unity IAP, and Android - PlayFab | Microsoft Docs, PlayFab will grant the purchased item to the player after validating the receipt, without requiring you to grant it manually. Did you perform the coin grant operation twice here (one by PlayFab and one by you)?

Also to clarify, event IDs are unique, each time an event is fired a different event ID is generated. Are the duplicate IDs you're talking about the user IDs?

10 |1200

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

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.