Spielerando

A player bought coins and got them twice, or paid and got nothing

Purchases arrive more than once, arrive late, or come back when the player reinstalls, and the game must give each one exactly once. Here is the small ledger your AI should keep, how to treat a purchase that is still pending, and what to do on restore.

Why this works

The store can send the same purchase again, late, or after a reinstall, so the game cannot count messages; it must remember which purchases it already honoured. Saving the reward before telling the store it arrived means a crash costs a repeat, never a loss, and a repeat is harmless.

When not to use it

Skip it when real money and cheating matter a lot, such as a shop with items of great value or play between people. A phone can be tampered with, so let your own server check each purchase with the store and hold the record.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 51 lines of example code with 5 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "A player bought coins and got them twice, or paid and got nothing" (read_entry purchase-receipt-granted-twice-or-lost) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP