I am trying to show an interstitial ad but my app get locked… Here’s my code
local tapfortap = require "plugin.tapfortap" tapfortap.initialize("85aa58c7a870570ab870f60d48935aef") storyboard = require("storyboard") local preload = storyboard.newScene() function preload:createScene( event ) -- Prepare an interstitial for the first call to showInterstitial() tapfortap.prepareInterstitial() end function goto() --REST OF CODE end function preload:enterScene( event ) -- Later show an App Wall tapfortap.showInterstitial() timer.performWithDelay(5000, goto, 1) end preload:addEventListener( "createScene" ) preload:addEventListener( "enterScene" ) return preload
As you see in my createScene I prepare the Ad and then in enterScene I try to show it, but it fails… My app keep open but do nothing!! Please help!
I think your issue may be that ‘goto’ is a reserved keyword in Lua, but you’ve tried to give that name to a function. Try naming the function something else and see if that fixes it.
Thank you, but I don’t have any error in the Corona Simulator… the goto function works and moves to next scene…
Ah, interesting, in that case it must not be it. Although as a best practice, you probably shouldn’t name a function ‘goto’, since it’s liable to be confusing and may cause issues down the road. (Similarly, you wouldn’t name a function ‘print’ unless you actually wanted to replace the standard print function.)
I haven’t used tapfortap myself, so unfortunately I can’t help with the issue you’re having.
Thank you for your advice… I will change this inmediatly.
Update… I have leave alone the Interstitial in a scene, but same happens… Just stick in that screen but no show the ad 
Hmm not sure what is going on at the moment. It seems like the plugin is not being included in builds at the moment as I myself get the following error:
java.lang.ClassNotFoundException: plugin.tapfortap.LuaLoader
So nothing is working as no calls can be made into the Tap for Tap library. I will take a look into this.
Solved! Sorry but there was a problem in the build.settings file! I will be testing Tap for Tap. Thanks
Awesome, now that you mention that, I think I also forgot to update my build.settings when I was testing your code which is why I got the error I did.
I think your issue may be that ‘goto’ is a reserved keyword in Lua, but you’ve tried to give that name to a function. Try naming the function something else and see if that fixes it.
Thank you, but I don’t have any error in the Corona Simulator… the goto function works and moves to next scene…
Ah, interesting, in that case it must not be it. Although as a best practice, you probably shouldn’t name a function ‘goto’, since it’s liable to be confusing and may cause issues down the road. (Similarly, you wouldn’t name a function ‘print’ unless you actually wanted to replace the standard print function.)
I haven’t used tapfortap myself, so unfortunately I can’t help with the issue you’re having.
Thank you for your advice… I will change this inmediatly.
Update… I have leave alone the Interstitial in a scene, but same happens… Just stick in that screen but no show the ad 
Hmm not sure what is going on at the moment. It seems like the plugin is not being included in builds at the moment as I myself get the following error:
java.lang.ClassNotFoundException: plugin.tapfortap.LuaLoader
So nothing is working as no calls can be made into the Tap for Tap library. I will take a look into this.
Solved! Sorry but there was a problem in the build.settings file! I will be testing Tap for Tap. Thanks
Awesome, now that you mention that, I think I also forgot to update my build.settings when I was testing your code which is why I got the error I did.