1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

IAP code generator

Discussion in 'Programming' started by JFitch, Sep 20, 2019.

  1. JFitch

    JFitch Member

    Sep 28, 2016
    I created a program on my website that autogenerates the code to run In App Purchases.

    Click Here, then choose "Game Maker IAP" in the options menu.

    Type the IAP information in the "IAP List" field. For example:
    id0, Item 0 Title, Item 0 Description, 1.99
    id1, Item 1 Title, Item 1 Description, 2.49
    id2, Item 2 Title, Item 2 Description, 2.99
    Then, click "Generate Code". It will generate the code to run when the app starts, the code to run in the IAP event, an array "purchases[n]" to check whether item n has been purchased, and a script that allows you to call "scriptName(n)" when you want to purchase item n.
  2. Yal

    Yal GMC Memer GMC Elder

    Jun 20, 2016
    Are you sure this is the best place to post this? The rules doesn't say anything explicitly, but they're heavily geared towards people asking how to do something, not people providing good-to-have code. It also looks kinda fishy (or should I say, phishy) just telling people to go fill in an online form on some random site.
  3. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Apr 13, 2016
    I hate to break it to you, but this will no longer work as all the IAP functions have been deprecated in GameMaker Studio 2 as of the latest 2.2.4 beta update. Now everything is done through extensions with their own custom functions and methods of working with them.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice