Hello,
I am using Unreal Engine 4.19's "Get User Inventory" blueprint node which returns a "ClientGetUserInventoryResult" with a payload of that player's Virtual Currency. I'm always able to retrieve from this the player's virtual currency, but when the player has a high virtual currency value the returned number is almost always offset by a few numbers.
Sometimes the value is correctly pulled down from Playfab, but usually it will have a slight offset. I tested a number of different PC values, and found that incrementing/decrementing is working correctly, but what I pull down from playfab is incorrect (even though playfab's value is correct when I look at it). I didn't experience any problems with low values (750, 7500, 75000).
I have no idea why this would occur outside of playfab treating virtual currencies in some manner before delivering them to me. Using the "GetUserInventory" Client call is very standard and I just created my own getter for the virtual currency value to see if that worked correctly but I had the exact same offset result.
Example 1:
*Printing out what I have*
LogBlueprintUserMessages: 75,000,000 PC
*Printing out what I just decremented*
LogBlueprintUserMessages: [BP_PF_PCUpdate] Successfully decremented a PC value of: 5.0. *Printing out new value of what I have (Playfab delivers the wrong value, but it is stored correctly online as 74,999,995)*
LogBlueprintUserMessages: [BP_PF_PCUpdate] Get PC returned. You have: 74999992 PC.
Example 2:
Note Output: At 75,800,000, spending 100, drop to 75,799,904. *InCorrect*. Playfab holds 75,799,900. Decrement:
LogBlueprintUserMessages: [PlayFab_PCUpdate_C_243] [BP_PF_PCUpdate] Successfully modified a PC value of: 100.0.
LogBlueprintUserMessages: [PlayFab_PCUpdate_C_243] Get PCs returned. You have: 75799904 PC.
Note Output: At 75,799,900, spending 100, drop to 75,799,800. *Correct*. Decrement:
LogBlueprintUserMessages: [PlayFab_PCUpdate_C_245] [BP_PF_PCUpdate] Successfully modified a PC value of: 100.0.
LogBlueprintUserMessages: [PlayFab_PCUpdate_C_245] Get PCs returned. You have: 75799800 PC.
Info:
TitleId: 59E9
Test PlayFabId: D80BB6A16B43EA48
The test player is logged in, and requesting the data for the same PlayFabId.