Applovin Rewarded Video not rewarding points

Hi Rob, I am just following the example below so not sure what you mean by define isIncentivized? Thanks

https://docs.coronalabs.com/plugin/applovin/show.html

When you see:  applovin.show( [isIncentivized] ) in the documentation, you need to read that that means:

isIncentivized (optional)

Boolean. Set this to true if you want to show an incentivized/rewarded video. Default is false. Note that you must enable “Rewarded Video” in the AppLovin developer portal to receive incentivized/rewarded videos in your app.

 

This says that applovin.show() takes a single parameter that is a boolean, it’s either true or false. The brackets tell you it’s an optional parameter.

So you can:

applovin.show( true ) -- gets incentive ads applovin.show( false ) -- gets non-incentive ads

You can optionally create a variable, named whatever you want, but we recommend “isIncentivized” as a good generic variable name. That means:

local isIncentivized = true applovin.show( isIncentivized )

is the same as:

applovin.show( true )

If you just do:

applovin.show( isIncentivized )

with out first creating a variable named isIncentivized it will default to nil, which in this case, its the same as nil. The simplest thing to do is just do:

applovin.load( true )

and

applovin.show( true )

Rob

Thanks for your help so far Rob but still couldn’t get this to work so I have given up on it.

Don’t give up. Can you post your code where you are attempting to load ads and where you are attempting to show ads?

It’s happening twice because of this:

elseif ( event.phase == “hidden” or event.phase == “playbackEnded” ) then – The ad was closed/hidden

IIRC, hidden and playbackEnded are both dispatched when the video ends.

Only increase the coins on playbackEnded.

@InfuseDreams that is interesting to know. Will try that now and see what happens

@Rob thanks and certainly won’t give up :). let me try InfuseDreams suggestion and see what happens.

Thanks @InfuseDreams & @Rob

removing event.phase == “hidden” worked.