Where have you tried using the ad? Corona’s errors like all other errors are never 100% accurate. Post the code where you tried using the ad.
} --\<------- you need a comma here excludeFiles =
You need to add a comma after the curly brace I indicated above.
Rob
Here is the code that is placed in the end scene of game.
local composer = require( "composer" ) local scene = composer.newScene() local widget = require "widget" local playButton -------------------------------------------- local coronaAds = require( "plugin.coronaAds" ) local interstitialPlacement = "end" local function showAd( event ) -- Show an ad if ( composer.getVariable( "coronaAdsInitialized" ) == true ) then coronaAds.show( interstitialPlacement, true ) end end local function destroyScene() composer.gotoScene( "game", { time=800, effect="crossFade" } ) composer.removeScene("end") end function scene:create( event ) local sceneGroup = self.view -- Code here runs when the scene is first created but has not yet appeared on screen local background = display.newImageRect( scene.view, "relaunch.png",display.actualContentWidth, display.actualContentHeight ) background.x = display.contentCenterX background.y = display.contentCenterY local laserSound = audio.loadSound( "end.mp3" ) local laserChannel = audio.play( laserSound ) local function playButton () playButton = display.newText( scene.view, "Play", display.contentCenterX, display.contentCenterY+180, native.systemFont, 44 ) playButton:setFillColor( 0.8, 2.2, 1.3 ) playButton:addEventListener( "tap", function() composer.gotoScene( "game", { time=800, effect="crossFade" } ) end ) playButton:addEventListener( "tap", function () destroyScene() end ) end local myclosure = function () return playButton () end timer.performWithDelay( 7000, myclosure, 1) end function scene:show( event ) local sceneGroup = self.view local phase = event.phase if phase == "will" then showAd() local myclosure1 = function () return showAd() end timer.performWithDelay( 7000, myclosure1, 1) elseif phase == "did" then end end function scene:hide( event ) local sceneGroup = self.view local phase = event.phase if event.phase == "will" then -- Called when the scene is on screen and is about to move off screen -- -- INSERT code here to pause the scene -- e.g. stop timers, stop animation, unload sounds, etc.) elseif phase == "did" then -- Called when the scene is now off screen end end function scene:destroy( event ) local sceneGroup = self.view -- Called prior to the removal of scene's "view" (sceneGroup) -- -- INSERT code here to cleanup the scene -- e.g. remove display objects, remove touch listeners, save state, etc. if playButton then display.remove( playButton ) playButton:removeSelf() -- widgets must be manually removed playButton = nil end end --------------------------------------------------------------------------------- -- Listener setup scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) ----------------------------------------------------------------------------------------- return scene