iap_event_queue

Creates a ds_queue of purchase information.

Syntax:

iap_event_queue();


Returns: ds_queue


Description

WARNING! This function has been deprecated.

The purpose of this function is to get all store changes or to receive confirmation when a purchase has gone through correctly. Note that the confirmation of purchase only means that the payment for the in app purchase has succeeded, it does not mean that any downloadable content associated with it has been received by the game. To check for that you should use the iap_product_files or iap_is_downloaded functions.

This function is only available in the IAP Event and will return a ds_queue with the following values (where appropriate):

NOTE: When we talk about the index NUMBER, we are not talking about the purchase id, but rather the position in the initial list that was used to activate purchases. For example, if you have activated 3 different items for purchase, and the player buys item number 2, the index number returned by this function would be 1 (numbering starts at 0, so product 1 is index 0, product 2 is index 1 and product 3 is index 2).

NOTE: The ds_queue created by the function is automatically removed by GameMaker: Studio at the end of the event, so there is no need for you to manually "clean up" and remove it from memory.


Example:

var q;
q = iap_event_queue();
if !ds_queue_empty(q))
   {
   store_status = ds_queue_dequeue(q);
   }

The above code will query the returned ds_queue to see if it contains data and if so, store (and remove from the queue) the first value found in the variable "store_status". For an extended example of use please see the function iap_store_status.


Back: In App Purchases
© Copyright YoYo Games Ltd. 2018 All Rights Reserved