Google update error


I have a problem, I can’t identify where it is, I just updated my game on google play and is giving this error.

This error happens when I give it up and install it again, it seems that the files are not being deleted. But it only happens if you do it through google, if you uninstall and install it by the apk it works.

I’m using version 3620. Can someone help me ??

You should never surface errors to players but handle these cases in code. The error tells you the problem, you are doing maths on a nil value. Look through your code and figure out where this nil value is coming from.

Right. But the problem only happens when I install it through google, if I install it through amazon or the apk this error doesn’t happen.

This problem of “fail in google, but doesn’t fail in own-APK” shouldn’t occur. Most likely in your code, there is a ‘store’ or ‘simulator’ check and some maths failed there.

FYI, you can go to your android play console. Download the APK from there (it should be downloaded like “1.apk” file, where 1 is the version number).

Normally your code should be one for all … but platform specific errors can happen … just like @yosu said if you have an if statement inside your code to run certain stuff only if the platform is apple or amazon or windows or simulator then the error might be there
in your case you should put be able to easily trace the problem, by putting a textfield object that shows certain messages before and after where the error occurs … this sound like a dummy but it helps when you don’t really know where exactly the problem is happening specially if the problem happens suddenly inside an event or a timer not based on a tap or touch event



and so on

if it happens on clear tap or touch events you should be able to find it easily by looking at any math related function like adding, >,<,~= etc. … and you should easily find the problem

you cannot for example say

if tonumber(myVariable)>0 then

if myVariable was nil

it has to be this way:

if myVariable ~= nil then
       if tonumber(myVariable)>0 then