Just released an update to my app that enables you to see a web pop up displaying the high score. The weird thing is, the first time you run the app, the web pop up works. However, if you close the app and reopen it, when going to open the web pop up, the app crashes. Any thoughts on why this is happening? Here’s the code I have for a dedicated score script.
local function CheckConn()
local answer={}
error=“Network OK”
local wawurl=“MyWebURL”
local c,r=http.request{
url = wawurl,
sink = ltn12.sink.table(answer)
}
if r==“host not found” then
error=r
– print (error)
end
if (r~=200 and r~=“host not found”) then
error="HTTP error "…r
print (error)
end
if error==“Network OK” then
native.showWebPopup( 10, 80, 620, 800,
“MyWebUrl”,
{urlRequest=listener} )
end
if error~=“Network OK” then
nocon.isVisible=true
submit.isVisible=false
submit:removeEventListener( “tap”, SubmitScore )
end
return error
end
I also have the Internet user permission under the build settings. If you want to test it for yourself, you can download it from the play store, the apps called Bus Rush Free, you must search Ryan Eutsey.
Thanks.