My game crashes after a rewarded video is closed

Hi, I tried out the admob extension and it turns out anytime a rewarded video has finished playing and I close it, the game stops.
What might have caused this?

Is it the one by @sergey.lerg?

Yeah

Have you checked the logs?
Is there a “_crash” file you can supply?

Do you have the admob listener function? What do you have in it?

local sysinfo = sys.get_sys_info()
local function listener(event)
    if event.phase == "init" or event.phase == "closed" then
	admob.load{
		type = "rewarded",
		id = rewarded_id[sysinfo.system_name],
		immersive = true,
		keywords = {"game", "casual"},
		is_designed_for_families = true
	}
     elseif event.phase == "rewarded" then
	    msg.post(sender, "completed")
    end
end

function init(self)
    admob.init{
	    app_id = app_id[sysinfo.system_name],
	    test = true, 
	    listener = listener
    	}
 end

What is sender in msg.post? Can you remove this line and test without it?

1 Like

That seems to be the problem. Thanks.