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

I put an ad with admob but it gives an error

Discussion in 'GameMaker Studio 2 Community Tech Support' started by eneskaplan34, Nov 23, 2019.

  1. eneskaplan34

    eneskaplan34 Member

    Joined:
    Oct 2, 2019
    Posts:
    4
    Code:
    11-23 17:49:35.157 10702 10921 W Ads     : Not retrying to fetch app settings
    11-23 17:49:35.187  2518 10892 W Ads     : Received error HTTP response code: 400
    11-23 17:49:35.191 10702 10702 I yoyo    : Banner Ad onAdFailedToLoad
    11-23 17:49:35.192 10702 10702 I Ads     : Ad failed to load : 0
    11-23 17:49:35.229  2518 10929 I Ads     : SDK version: afma-sdk-a-v19649999.15000000.1
    11-23 17:49:35.443  2518 10929 W Ads     : Received error HTTP response code: 400
    11-23 17:49:35.443 10702 10702 I Ads     : Use AdRequest.Builder.addTestDevice("12817C88E6D07F18CD75EFC61F936CD1") to get test ads on this  : 0
    why it gives error
    Code:
    if (game.rewarded_loaded) {
        global.duvark = 3;
    } else {
     
    }
    
    if (device_mouse_check_button_pressed(0, mb_left) && position_meeting(mouse_x, mouse_y, self)) {
        if (game.rewarded_loaded) {
            GoogleMobileAds_ShowRewardedVideo();
            game.rewarded_loaded = false;
        } else {
            GoogleMobileAds_LoadRewardedVideo(game.rewarded_id);
        }
    }
    
    Code:
    ads_app_id     = "ca-app-pub-5816347274633366~5457785557";
    banner_id      = "ca-app-pub-5816347274633366/1650047260";
    rewarded_id      = "ca-app-pub-5816347274633366/8870061735";
    interstitial_id  = "ca-app-pub-5816347274633366/7756645835";
    
    //Initialize extension
    GoogleMobileAds_Init(interstitial_id, ads_app_id);
    GoogleMobileAds_LoadInterstitial();
    interstitial_loaded = false;
    
    GoogleMobileAds_LoadRewardedVideo(rewarded_id);
    rewarded_loaded = false;
    rewarded_viewed = false;
    
    GoogleMobileAds_UseTestAds (true, "E3DAE5ACB5072BA36197B94E287927C9");
    
     
  2. MrBazooka

    MrBazooka Member

    Joined:
    Jul 6, 2018
    Posts:
    13
    Hi there. Look at this article https://help.yoyogames.com/hc/en-us/articles/360002971751-iOS-and-Android-Google-Mobile-Ads-Setup
    For one, you're missing the async social event and you're not using test ad units. Be careful you can get your Admob account suspended if you're not using test ads while your game/app is not released yet.

    See below for test ad ids for ios and android.
    IOS:
    https://developers.google.com/admob/ios/test-ads

    Android:
    https://developers.google.com/admob/android/test-ads
     

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