GML About advertising programming

uni00

Member
Good evening. I am developing an android game app. I want to use Intermotional Ads with Admob. I tried programming based on the following URL, but nothing happens. .. .. There is no error.


The id will be a temporary name here.
I want the advertisement to appear when the room moves.
thanks!

GML:
--obj_UI--

[create]

if os_type == os_ios
    {
    }
else
    {
    app_id = "ca-app-pub-〇〇〇〇〇";
    interstitial_id = "ca-app-pub-〇〇〇〇";
    }
GoogleMobileAds_Init(interstitial_id, app_id);
GoogleMobileAds_LoadInterstitial();
interstitial_loaded = false;

[step]
if GoogleMobileAds_InterstitialStatus() == "Ready"
    {
    if interstitial_loaded != true
        {
        interstitial_loaded = true;
        }
    }
   
[room start]
if interstitial_loaded == true
    {
    interstitial_loaded = false;
    GoogleMobileAds_ShowInterstitial();
    }  
   
[Async social]
    var _id = async_load[? "id"];
if _id == GoogleMobileAds_ASyncEvent
   {
   var ident = async_load[? "type"];
    switch (ident)
        {
        case "interstitial_load":
            if async_load[? "loaded"] == 1
                {
                interstitial_loaded = true;
                }
            break;
        }
    }
 
Top