Admob Errors
I am trying to implement Admob ads into my game from a recent tutorial. Under the NativeExpressAdClient script I am receiving 5 errors.
 Externs.GADUSetNativeExpressAdCallbacks (
                 this.NativeExpressAdViewPtr,
                 this.NativeExpressAdViewDidReceiveAdCallback,
                 this.NativeExpressAdViewDidFailToReceiveAdWithErrorCallback,
                 this.NativeExpressAdViewWillPresentScreenCallback,
                 this.NativeExpressAdViewDidDismissScreenCallback,
                 this.NativeExpressAdViewWillLeaveApplicationCallback);
         }
The errors are coming from the bottom 5 lines. To give an example, for the line:
 this.NativeExpressAdViewDidReceiveAdCallback,
I receive the error:
Static member 'GoogleMobileAds.iOS.NativeExpressAdClient.NativeExpressAdViewDidReceiveAdCallback(System.IntPtr)' cannot be accessed with an instance reference, qualify it with a type name instead (CS0176) (Assembly-CSharp)
This has been hurting my head and I've been searching for a solution for the last 2 days and had no success. I've tried reimporting the package multiple times. Any help is appreciated.
Answer by MaceB · Oct 14, 2016 at 08:06 PM
Changed the code to this:
 Externs.GADUSetNativeExpressAdCallbacks (
                 this.NativeExpressAdViewPtr,
                 NativeExpressAdClient.NativeExpressAdViewDidReceiveAdCallback,
                 NativeExpressAdClient.NativeExpressAdViewDidFailToReceiveAdWithErrorCallback,
                 NativeExpressAdClient.NativeExpressAdViewWillPresentScreenCallback,
                 NativeExpressAdClient.NativeExpressAdViewDidDismissScreenCallback,
                 NativeExpressAdClient.NativeExpressAdViewWillLeaveApplicationCallback);
         }
The error went away but I'm unsure if the scripts will run the way they are supposed to. I will post again if the ads begin working.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                