Type Function Return value Boolean Revision Release 2022.3683 Keywords ads, advertising, SuperAwesome, isLoaded See also superawesome.show() superawesome.load() superawesome.*
Checks whether an ad is already loaded. Returns true
if an ad is loaded/ready, otherwise returns false
.
superawesome.isLoaded( placementID )
String. The placement ID for the ad, retrieved from the SuperAwesome dashboard.
local superawesome = require( "plugin.superawesome" ) -- Pre-declare a placement ID local myPlacementID = "YOUR_PLACEMENT_ID" local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization -- Load a banner ad superawesome.load( "banner", { placementId=myPlacementID } ) end end -- Initialize the SuperAwesome plugin superawesome.init( adListener, { testMode=true } ) -- Sometime later, check if the ad is loaded local isAdLoaded = superawesome.isLoaded( myPlacementID ) print( isAdLoaded )