attempt to compare nil with number? replay button

line 97 attempt to compare nil with number… whats going on this happens when I click my button to reload the scene.

I’m sorry if this will sound a little harsh but you have been posting questions all over the forums with multiple questions on the same issue and on many issues at the same time. As someone else already suggested you should check some of the tutorials and samples to get a basic understanding of how things work before you start coding a complete game. Small bites. Post A QUESTION (ONE) only on specific issues you have after you have researched the API you are using that is giving you trouble and put some effort into fixing it yourself. By spaming the forums you will basically anoy everyone to the point that they will ignore your questions.

On your issue:

You have not canceled your enterFrame event listeners on objects that have been removed and destroyed. Before you remove an object or a grup containing an object make sure you remove it’s event listeners.

ok sorry and I fixed it already

I’m sorry if this will sound a little harsh but you have been posting questions all over the forums with multiple questions on the same issue and on many issues at the same time. As someone else already suggested you should check some of the tutorials and samples to get a basic understanding of how things work before you start coding a complete game. Small bites. Post A QUESTION (ONE) only on specific issues you have after you have researched the API you are using that is giving you trouble and put some effort into fixing it yourself. By spaming the forums you will basically anoy everyone to the point that they will ignore your questions.

On your issue:

You have not canceled your enterFrame event listeners on objects that have been removed and destroyed. Before you remove an object or a grup containing an object make sure you remove it’s event listeners.

ok sorry and I fixed it already