Corona Simulator Runtime error on only 1 of the 3 games with the same code.

I am a newbie. I have the same code for 3 reskined games. Now one version just started to get this run time error and the other 2 versions work fine. The code is one I purchased to help me learn how to use corona ands the versions that I’m now getting this error with was working fine 2 hours ago. and for the last month. 

File: game.lua

Line: 687

Attempt to perform arithmetic on field ‘fishes’ (a nil value)

stack traceback:

game.lua:687: in function <game.lua:653>

(tail call): ?

?: in function <?:481>

?: in function <?:218>

 

 

I also replaced the code with .lua files form the other two versions and i am still getting this run time error while the other 2 versions play fine.

 

Thank you for your help.

Without seeing the code it’s going to be hard to answer this, but on line 687 of game.lua you are trying to do some math with the variable “fishes” which either doesn’t exist or is nil.

I’m guessing you renamed a variable from fishes to somewhere else and maybe missed it in this line.

Rob

Without seeing the code it’s going to be hard to answer this, but on line 687 of game.lua you are trying to do some math with the variable “fishes” which either doesn’t exist or is nil.

I’m guessing you renamed a variable from fishes to somewhere else and maybe missed it in this line.

Rob