Problem setting up "NEW" in-app purchase

http_gamesaladhttp_gamesalad Member Posts: 1,340
edited July 2015 in Working with GS (Mac)

Well I recently just found out gamesalad has changed out their in app process. So I've been trying to follow this video that the @The_Gamesalad_Guru has made! I'm having a very hard time trying to understand this. I have no idea what to put in the "Name" or "State". I'm trying to make 3 different types of consumable in-app purchases (one for 100 stars, another for 500 & last for 100 stars). I've tried to follow the video as best as I can but either I'm not getting some stuff or he might have left some stuff blank .. this is what I have set up in my game & the error message I keep getting when I try to preview it.
Image and video hosting by TinyPic
Image and video hosting by TinyPic
Image and video hosting by TinyPic
Image and video hosting by TinyPic

Comments

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276
    edited July 2015

    In the purchase table you only fill the "id" column, and the "consumable" column. Rest gets filled automatically when reguesting the purchase data.

    I don't see the "request purchase data" behavior in your code. Is it there somewhere?

    Also, did you check the cookbook tutorial? It's all explained there...

    EDIT: I took a closer look at your screenshots...

    1. In the "Buy" rule, you should have "in-app purchase - buy item", not "consume item"

    2. In the "Confirm purchase" rule, delete the "change table value" behavior. You do not need to change anything in the PurchaseTable.

    3. You do not need to save the PurchaseTable. Instead, save the game.Bank / star attribute.

    Everything else seems to be right. Except that you need the "Request purchase data" behavior on the top of the code.

    Mental Donkey Games
    Website - Facebook - Twitter

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    Here is a demo showing how you set up a consumable in-app purchase.

    Remember, that you can´t test in-app purchases in the Creator.

    Mental Donkey Games
    Website - Facebook - Twitter

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @NipaDidIt I noticed that even though that you said in - app is not supported by preview game.Bank/Star = 100 before you even buy anything.

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    @http_gamesalad said:
    I noticed that even though that you said in - app is not supported by preview game.Bank/Star = 100 before you even buy anything.

    Is this a question?
    If it is, could you rephrase it so i can make some sense of it.

    Mental Donkey Games
    Website - Facebook - Twitter

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited July 2015

    @NipaDidIt
    This is the updated version I copied from your template
    Image and video hosting by TinyPic
    Image and video hosting by TinyPic

    This is what is happening in the game. Once you start up the game game.bank/star is getting the 100 added instantly before you buy the in app purchase. (shown in the upper left)
    Image and video hosting by TinyPic

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    That´s odd. It should not happen if the PurchaseTable,1,5 is not "purchased"...
    Are you sure there´s nothing else changing the bank/star attribute?

    Turn the iap rules off. if it still adds the 100 to it, there´s something else changing the attribute.

    Mental Donkey Games
    Website - Facebook - Twitter

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276
    edited July 2015

    Just came to my mind...
    Did you manually write "purchased" in the PurchaseTable, in row 1, column 5?
    If you did, that´s the problem.

    You should NOT put ANYTHING in columns 3,4 or 5 in the PurchaseTable.

    Mental Donkey Games
    Website - Facebook - Twitter

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @NipaDidIt I already tried turning off the iAp & it didn't happen. My purchase table only has the ID & the consumable checked. 3,4,5 are blank. I turned of the change attribute game.bank/star to game.bank/star +100 & I didn't get the problem..

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    I´m running out of ideas... The only thing i can still think of, do you have anything in the "otherwise" sections of the iap rules?

    Sending you a PM...

    Mental Donkey Games
    Website - Facebook - Twitter

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Hey @NipaDidIt I just downloaded your "iapDemo" project and it's a very simple/clean setup and easy to follow!

    I've had some trouble with the IAP's in my game. For some reason my non-consumables are being purchased the same time I purchase a consumable, such as 100 coins.

    I believe my problem has something to do with my tables...I have my purchaseTable with columns 3-5 blank but also another IAP_Storage table.

    I love the way your "iapDemo" project is setup because this is how I would do it! But after watching the video by @The_Gamesalad_Guru he mentions (about 13:00 minutes in) making an IAP_Storage table and saving to that.

    Is an IAP_Storage table absolutely necessary? Or can I just save the attributes and load them in the beginning of the game?

    I feel this may solve my issue but it's a pain to republish and launch another version through TestFlight just to test IAP's...

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    @As_Of_Latte said:
    Is an IAP_Storage table absolutely necessary? Or can I just save the attributes and load them in the beginning of the game?

    Thanks!

    It´s basically the same thing wether you use a Table or attributes, but with tables it´s much easier / less work.

    -If you use attributes, you need to save every attribute, and remember to load them at the beginning of the game.

    -If you use a Table, you only need to save the table, and it will automatically be loaded at the beginning of the game.

    But you can use either method you want.

    Mental Donkey Games
    Website - Facebook - Twitter

Sign In or Register to comment.