Hi Rob, thank you for your time… With that correctcion I have the error… “attempt to compare number with nil”
You need to make sure that you are not overwriting output somewhere else that’s not the display.newText() that you’re creating a few lines above
Yeah! You have reason, thank you so much… Now I can save my local highscores :D… Now I will work on the global highscores with corona cloud… wish me luck :D!
Good luck jhsanchez
I’m glad you’ve already solved that !
Rob and paytopwn I have a problem with local records… the game save the records correctly when I use the app butttt… when I close the app and start over again the records has restarted… Exist some solution for this? Thank you so much for your help… Regards.
You need to save the data to a file in your app’s file system space. I don’t know much about the library you are using to track the information, so I really can’t help too much. There are several saving data entries in the community code.
Oh :/…
I have all the day readding the docs for the library but I dont understand whats going on…
Paytopwn… I hope you can help me.
If you’ve followed my original code you’ll see that some of the data is saved as preferences - then it’s possible that you’re overwritting on every execution of your game all the values (in other words, every time you start your game you clear all your saved scores to the initial value you have in your code).
preference.save{ highscore = 1} --preference highscore
If that’s what you have in your main, you have no condition to check if there’s a higher score saved, and a simple solution would make an if statement to check if that highscore is greater than 1 (meaning that you’ve have saved something before).
What Rob says about using a file instead of a preference sounds better, even though using the way you have it would be easier.
“Programar es como conducir, cada uno lo hace como quiere”
Si amigo, efectivamente ayer me di cuenta de ese terrible error y ya pude corregirlo :D! Muchas gracias bro, saludos
Hi everyone
I start it this post back on February 2013, we are now in July 2013 and still I can not put a score in action.
anyone has a "very simple sample code in storyboard so I can see how to “hold a score in a variable”
or something that keeps track of the points, when I do something in the program?
thanks
Hi everyone
I start it this post back on February 2013, we are now in July 2013 and still I can not put a score in action.
anyone has a "very simple sample code in storyboard so I can see how to “hold a score in a variable”
or something that keeps track of the points, when I do something in the program?
thanks