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
Answer by bbekec · Feb 25 at 08:28 AM
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
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).
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
I'm glad you solved this problem.
Currently, PlayFab only has IAP tutorials on Android.
Thanks. i need this tutorial. This is a request that please prepare and publish a tutorial for ios, too.
Regards
Answer by Made Wang · Feb 25 at 06:31 AM
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?
Item expiration and events 1 Answer
PlayStream Rules Custom Event Name wrong? Or Rule is not being triggered? 1 Answer
How can I use actions with "character_inventory_item_added"? 1 Answer
Is it possible to have PlayStream event when an inventory item expires? 1 Answer
How to revoke player inventory item from the console and automatically update the player data 1 Answer