question

doronhn avatar image
doronhn asked

player inventory items removed with no reason

Hey,

i use a lot with the combination of cloud script and grant \ invoke player items.


somehow today my player lost his inventory while i only revoked an item.
i saw the PlayStream of the player and everything looks fine.

any idea why?

{
    "EventName": "player_executed_cloudscript",
    "Source": "CloudScript",
    "FunctionName": "RevokePowerUpToUser",
    "CloudScriptExecutionResult": {
        "FunctionName": "RevokePowerUpToUser",
        "Revision": 36,
        "FunctionResult": null,
        "FunctionResultTooLarge": null,
        "Logs": [],
        "LogsTooLarge": null,
        "ExecutionTimeSeconds": 0.0187737,
        "ProcessorTimeSeconds": 0,
        "MemoryConsumedBytes": 3176,
        "APIRequestsIssued": 1,
        "HttpRequestsIssued": 0,
        "Error": null
    },
    "EventNamespace": "com.playfab",
    "EntityType": "player",
    "TitleId": "D668",
    "EntityId": "CE72AF93FE68A384",
    "EventId": "ef3ba2818ab74f31bc60c4a66ee8960c",
    "SourceType": "BackEnd",
    "Timestamp": "2018-09-23T13:49:02.0766787Z",
    "History": null,
    "CustomTags": null,
    "Reserved": null,
    "PlayFabEnvironment": {
        "Vertical": "master",
        "Cloud": "main",
        "Application": "logicserver",
        "Commit": "a19ffd5"
    }
}
CloudScriptPlayer Inventory
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

·
brendan avatar image
brendan answered

From the user's event history, the Client called that script many times over a few minutes, and each call revoked one item (https://developer.playfab.com/en-US/D668/players/CE72AF93FE68A384/event-history?query=UmV2b2tlUG93ZXJVcFRvVXNlcg==&sumBy=&termsField=). If you think an item was revoked that shouldn't have been, can you specify the Item Instance ID?

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

doronhn avatar image doronhn commented ·

well this user has X amount of that item, and i revoked twice.

instead of make the amount X-2 , its went down to 0.

i will re-created the bug, this is the instance ID.

(i will first grant a few, so i will have like 5-6 of that instance) then you will see when i revoke once or twice the item has gone from my inventory.

7AC7C4AAEC92FBC4
0 Likes 0 ·
brendan avatar image brendan ♦♦ doronhn commented ·

Revocation removes the item instance from the player's inventory completely. If you want to only decrement the total number of a stack, you should use ConsumeItem.

0 Likes 0 ·
doronhn avatar image doronhn commented ·

done- made it.

0 Likes 0 ·

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]