Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Battle pass sample

Discussion in 'Economy' started by spinaljack, Apr 21, 2023.

  1. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    When I run the battle pass purchase battle pass cloud script I get the error:

    Code (CSharp):
    1. Invocation Error
    2. ------------------------------
    3. Error: {"status":10501,"name":"EconomyError: Not found","message":"Virtual purchase failed: Purchase item not found","retryAfter":null,"details":""}
    4.  
    5. at transformAndThrowCaughtException (BattlePass_PurchaseBattlePass.js:317:11)
    6. at module.exports (BattlePass_PurchaseBattlePass.js:63:89)
    I've checked can I've got the BATTLE_PASS virtual purchase set up and published.

    This is on my own project which I'm trying to replicate the sample project.

    EDIT: the instructions says to make a virtual purchase called Battle Pass but the you actually have to call it Battle Pass Purchase. Someone should update the readme and markdown
     
    Last edited: Apr 23, 2023
  2. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    After refreshing a couple times the test run started working in the dashboard but now it wont run in the editor. After pressing play in the sample battle pass scene I get this error:
    upload_2023-4-21_16-33-45.png
     
  3. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Ok I think it's because I set up the cloud scripts in the dev environment and not the production environment. How do I copy all the settings from one environment to another?
     
  4. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    I sent unity an e-mail and they said they'll look at adding a "promote all" style button in the future to cloud code and economy. For now I'll just have to copy paste it one at a time...