• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

I put an ad with admob but it gives an error

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
Reward ads :
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);
    }
}
Data: Game Start event
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");
 

MrBazooka

Member
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
 
Top