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..
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
error details
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
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
What's new? Ansca Mobile knows what's best for you!
Why increase app size??
Interview with Jayantv, Oz Apps Founder...
Forums Restructuring
Pinch Zoom...and Pan Image working together in harmony?
Building for android. Server not responding
Animation (solved)
Importing modules. How you do this?
Gradient Support in more Vector Shapes
[Solved?] Got the valid product id, but purchase always fail
Why increase app size??
Interview with Jayantv, Oz Apps Founder...
Forums Restructuring
Pinch Zoom...and Pan Image working together in harmony?
Building for android. Server not responding
Animation (solved)
Importing modules. How you do this?
Gradient Support in more Vector Shapes
[Solved?] Got the valid product id, but purchase always fail
corona forums © 2003-2011