GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Consumable and Non-Consumables are combined.

As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

Hey guys,

I've recently added In App Purchases to my game and followed the new video tutorial by @The_Gamesalad_Guru My consumable IAP's seem to be working fine. I'll pay $0.99 and receive 250 coins.

However, I've noticed that occasionally when I purchase a consumable IAP, my non-consumable (Remove Ads) is somehow combined. Even though I did not press or request to purchase my non-consumable, the ads are removed at the same time I purchase a consumable, such as 250 coins.

Has this happened to anyone or does anyone know what I may be doing wrong?

Thanks!

Comments

  • hoomann210hoomann210 Posts: 63Member

    how about when you only purchase the non-consumable one? does the state of your consumable change too?

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    @hoomann210 Well, it's hard to test. I only have one non-consumable. So, to test if purchasing a non-consumable affects my consumables, I have to actually delete my game from my phone and do a fresh install from TestFlight.

    Once the fresh install is complete and I reopen my game, I can see my non-consumable purchase button available. However, when I press my non-consumable button I receive a pop up from Apple saying "I've already purchased this item would you like to have it for free?"

  • MentalDonkeyGamesMentalDonkeyGames Posts: 1,276Member
    edited July 2015

    Just an idea...

    In the iap rules that say:
    When Text expression TableCellValue(PurchaseTable,1,5) = purchased

    Do you have the correct rows set in the Text expressions?

    If you have 2 in-app purchases, then the other one should be TableCellValue(PurchaseTable,2,5).

    If they both have TableCellValue(PurchaseTable,1,5) then both rules will fire when one is purchased.

    Hope that made sense :smiley:

    Mental Donkey Games
    Website - Facebook - Twitter

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    @NipaDidIt That makes perfect sense! I went through and double checked and I do have the correct rows set in the text expression. So, I am unsure why they would both be firing...

  • MentalDonkeyGamesMentalDonkeyGames Posts: 1,276Member

    Ok. One more thing that comes to my mind:
    In the iap rules, have you written the "purchased" text straight in the textbox, or in the expression editor?

    If it´s in the expression editor, remove the expression and type it straight in the textbox. Do this for all your in-app purchases.

    Also check that in your "in-app purchase - buy item" behaviors the Product ID is written straight in to the textbox, and not in the expression editor.

    Mental Donkey Games
    Website - Facebook - Twitter

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    @NipaDidIt That could be it! I'm so use to using the expression editor, I may have used it without realizing...

    I'll be sure to make that change and give TestFlight another go today. Thanks, I'll let you know what happens!

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    @NipaDidIt Quick question! If I have a non-consumable item and it is purchased, do I have to change the purchaseTable, table value and save? Or is the purchaseTable automatically update and the boolean is switched over to "true".

  • MentalDonkeyGamesMentalDonkeyGames Posts: 1,276Member
    edited July 2015

    You never need to change the cells in the PurchaseTable, and you never need to save the PurchaseTable. It is automatically filled every time the "Reguest purchase data" behavior is fired.

    And since you are changing the game.remove ads to "true", and saving the attribute, it will remain "true" as long as you load the attribute at the beginning of the game. Even if the "reguest purchase data" is not fired.

    Mental Donkey Games
    Website - Facebook - Twitter

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    @NipaDidIt Awesome, thanks for the quick response! Just had to check, can't be too safe.

  • MentalDonkeyGamesMentalDonkeyGames Posts: 1,276Member

    @As_Of_Latte You´re welcome!

    Did you get the in-app purchases to work properly?

    Mental Donkey Games
    Website - Facebook - Twitter

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    @NipaDidIt I'm actually launching TestFlight now! It's looks promising but I'll know for sure in a little bit.

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    @NipaDidIt Unfortunately, the issue occurred again. I went to purchase a consumable and did not even press or request to buy a non-consumable, yet it was still purchased at the same time...

  • MentalDonkeyGamesMentalDonkeyGames Posts: 1,276Member

    @As_Of_Latte i sent you a PM.

    Mental Donkey Games
    Website - Facebook - Twitter

  • hoomann210hoomann210 Posts: 63Member

    @As_Of_Latte did it work properly the first time you purchased them? i have a similar issue which is when i bought my IAPs for the first time it worked great..then i reinstall the app and as you mentioned it said you have already bought it..then both of my IAPs turned purchased because the request purchase data behavior did its job..

Sign In or Register to comment.