error details

what does "attempt to compare nil with number means " ?
I am getting this error when i try to compare my game score to best score.Please help me know what to do with that error..

Nil means it doesn't exist.

Are you still using the same score system as previously? If so you should make sure you are using score.getScore() (I believe that's it, if not, check the score file as it is listed there) to compare.

Peach :)

No.I am not using the one that i had asked you for.Now i am doing it in a different way.I am taking four variables

1
2
3
4
                local gameScore = 0
                local bestScore
                local scoreText
                local bestScoreText

Are you using director? If so, your local gameScore wont be available in other scenes. (Because it is local not global.)

If not, have you defined bestScore as a number value before trying to compare the two values?

Clearly one is being seen and the other is not - that's what we need to work out now.

Peach :)

views:1584 update:2011/11/25 8:45:21
corona forums © 2003-2011