• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android android ADMOB cant load ads

3jgamesdev

Member
Hi good day,

I just follow what is written here in the documentation, but still it wont load my ads and im having an error while loading the ads,
this is my code

Create event:
Code:
if os_type == os_android
    {
    app_id = "ca-app-pub-9788304447904432~8732328925";
    banner_id = "ca-app-pub-9788304447904432~8732328925";
    interstitial_id = "ca-app-pub-9788304447904432/2491683197";
    //rewarded_id = "ca-app-pub-4337965814269841/5893055399";
    }

GoogleMobileAds_Init(interstitial_id, app_id);
GoogleMobileAds_LoadInterstitial();
interstitial_loaded = false;
Async Social:

Code:
var _id = async_load[? "id"];
if _id == GoogleMobileAds_ASyncEvent
{
var ident = async_load[? "type"];
switch (ident)
    {
    case "banner_load":
        if async_load[? "loaded"] == 1
            {
            var _bw = GoogleMobileAds_BannerGetWidth();
            var _bh = GoogleMobileAds_BannerGetHeight();
            var _hh = display_get_height();
            var _ww = display_get_width();
            GoogleMobileAds_MoveBanner((_ww / 2) - (_bw / 2), _hh - _bh);
            }
        break;
    }
}
Step event:
Code:
GoogleMobileAds_AddBannerAt(banner_id, GoogleMobileAds_Banner, camera_get_view_x(0),camera_get_view_y(0));
Please help i still didnt get where i went wrong
 
Last edited:
Top