Attempt to call a nil value

Hi, Ive recently returned to programming after a 3 year hiatus, attempting to finish a game I had nearly finished. With the new updates to corona it looks like a bug  has developed. Runtime error: attempt to call a nil value. The output does not give any additional information, so I am not sure how to debug it. I have no idea what the problem may be because it appears very random in origin. Can someone offer advice on how to figure out what is going on? On windows version of corona.

Put some prints statements or breaks in your code to see where the error originates.

I typically put print statements in a lot of code blocks that say “terrain creation started”, “terrain creation completed” etc. This allows me to follow my code somewhat, and see when and where errors pop up.

Possible you’re requiring in some stuff that no longer exists.

Theres some information on why you may be getting a nil value reference on this Corona blog post

http://coronalabs.com/blog/2013/02/27/wednesday-faqs-corona-run-time-errors/

Put some prints statements or breaks in your code to see where the error originates.

I typically put print statements in a lot of code blocks that say “terrain creation started”, “terrain creation completed” etc. This allows me to follow my code somewhat, and see when and where errors pop up.

Possible you’re requiring in some stuff that no longer exists.

Theres some information on why you may be getting a nil value reference on this Corona blog post

http://coronalabs.com/blog/2013/02/27/wednesday-faqs-corona-run-time-errors/