First of all they are warnings. You cannot use AdMob in the simulator. You must test on a device to test with it. There is a stub plugin that loads in the sim that issues the warning and lets your ads.* calls run without causing errors.
I builded game on device and corona simulator console recieved these errors:
1.[Device] ERROR: Runtime error
2.[Device] Runtime Error: Runtime error: /Users/xxx/Documents/TestingGame/restart.lua:94: attempt to index global ‘ads’ (a nil value)
My build.setting look like on my first post.
main.lua look like (I implement for iOS):
local ads = require( "ads" ) local appID = "ca-app-pub-MYNUMBERS" if ( system.getInfo( "platformName" ) == "Android" ) then appID = "myAndroidAdProviderAppID" end local adProvider = "admob" function adListener( event ) -- end ads.init( adProvider, appID, adListener )
On my restart script (when user lost) code is:
function showAd()--I CALL THIS FUNCTION ON SCENE:SHOW(EVENT) if ( ads.isLoaded("interstitial") ) then ads.show("interstitial") end end