Need help with HighScore

0 favourites
  • 13 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Why it become NaN ?

    What is NaN ?

  • NaN is "Not a Number"

    I've help you lots so I think some tough love - Seriously its called search and find.

  • DUTOIT so? how to make it be a number? i've follow every highscore tutorial.

  • DUTOIT so? how to make it be a number? i've follow every highscore tutorial.

    You've made a mistake. It is not storing any info. Or it is storing as text. Either way, you aren't storing it correctly or calculating it correctly. Redo the tutorials, check your process.

    You ask a lot of help, you ask a lot of capx (please make me a capx to do this), but you still can't master the basics. You are a copy paste programmer, and will never learn until you actually start programming.

    Time to start learning. You made a mistake in your how you store the highstore, or calculate it, or retrieve it.

    Easter is here. Go find the easter egg

  • > DUTOIT so? how to make it be a number? i've follow every highscore tutorial.

    >

    You've made a mistake. It is not storing any info. Or it is storing as text. Either way, you aren't storing it correctly or calculating it correctly. Redo the tutorials, check your process.

    You ask a lot of help, you ask a lot of capx (please make me a capx to do this), but you still can't master the basics. You are a copy paste programmer, and will never learn until you actually start programming.

    Time to start learning. You made a mistake in your how you store the highstore, or calculate it, or retrieve it.

    Easter is here. Go find the easter egg

    owhh.. i have search it correctly,but nothing finded the error,i will search it again later.

    lol

  • What tutorial you using?

    Check the process of storing the highscore. I suspect you will find the problem there.

    Also run it in debug mode and see what is being stored or isn't being stored

  • DUTOIT

    You can tell your a father as you have the patience of a saint !

  • What tutorial you using?

    Check the process of storing the highscore. I suspect you will find the problem there.

    Also run it in debug mode and see what is being stored or isn't being stored

    i use Construct 2 video tutorial,and by the way,that's all same with the tutorial.

    and now i have tested it again,i want ask something,Web Storage save all of highscore right?

    and the local key values must different with first time local key?

    ex :

    First time : HighScore

    Second time : HighScore2 => is this problem?

  • DUTOIT

    You can tell your a father as you have the patience of a saint !

    He shall now be bestowed the name Saint Dutoit!

    Hardty, I am still a beginner, but I went through what you are facing not too long ago, so I will give you a clue. Dutoit mention that it is either an error in how you store, calculate or retrieve the data, I can't say for sure without seeing it, but I would take a good look at how you store it. It might have just missed your eye, so look at it a bit more.

    Hehe I won't give you a straight answer and go against Saint Dutoit who has helped me soo much

  • zenox98, rekjl,

    Lol, thanks guys.

    ,

    Webstorage only saves players score, and cannot be accessed by other players. Webstorage is not what you think it is. It is saving to players computer only.

    If you want global webstorage, you need an external database, which is going to be far beyond your current skill level. There are tuts on it using mysql (I think) but that is pretty advanced an requires actual programming knowledge.

    I don't understand your highscore1 and highscore2,

    But highscore is highscore and should be over written with new highscore.

    Highscore = 5000

    PlayerScore >= Highscore then Set Highscore = PlayerScore else Leave Highscore = Highscore.

    But like i said, global highscore cannot be stored using anything in construct, you need to use external storage options.

    Edit:

    Global Highscore is players wanting to beat the best score of the game.

    or

    Player wanting to beat his current best score? which you don't need an external database. Because if you just want player competing against his best score then, webstorage will work.

    Edit 2: Added 2 files. One is highscore example. As you can see it stores highscores, but the high scores are not persistent, when you exit game, you loose highscores.

    You need to save them to webstorage to make them persistent.

    So attachment to is something I did for someone else, it is saving gold coins to webstorage.

    Your homework assignment is to make the highscores save to webstorage. Oh, I will not be checking your homework, because in life, you have to be your own teacher and student.

    Saving to external database is too advanced for you, so I am not even going into that.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • zenox98, rekjl,

    Lol, thanks guys.

    ,

    Webstorage only saves players score, and cannot be accessed by other players. Webstorage is not what you think it is. It is saving to players computer only.

    If you want global webstorage, you need an external database, which is going to be far beyond your current skill level. There are tuts on it using mysql (I think) but that is pretty advanced an requires actual programming knowledge.

    I don't understand your highscore1 and highscore2,

    But highscore is highscore and should be over written with new highscore.

    Highscore = 5000

    PlayerScore >= Highscore then Set Highscore = PlayerScore else Leave Highscore = Highscore.

    But like i said, global highscore cannot be stored using anything in construct, you need to use external storage options.

    Edit:

    Global Highscore is players wanting to beat the best score of the game.

    or

    Player wanting to beat his current best score? which you don't need an external database. Because if you just want player competing against his best score then, webstorage will work.

    Edit 2: Added 2 files. One is highscore example. As you can see it stores highscores, but the high scores are not persistent, when you exit game, you loose highscores.

    You need to save them to webstorage to make them persistent.

    So attachment to is something I did for someone else, it is saving gold coins to webstorage.

    Your homework assignment is to make the highscores save to webstorage. Oh, I will not be checking your homework, because in life, you have to be your own teacher and student.

    Saving to external database is too advanced for you, so I am not even going into that.

    i think when i use webstorage,i must use different name with another capx webstorage.

    like my tibiame hops 1 game,thats using webstorage too.. its named highscore,then,i use the same name at another capx,but when i test playing another capx,the score is showed from tibiame hops 1 highscore.

    example :

    TibiaME Hops 1 = Highscore : 200

    Another capx = Highscore : 200 / sometimes it will be NaN

  • zenox98, rekjl,

    Lol, thanks guys.

    ,

    Webstorage only saves players score, and cannot be accessed by other players. Webstorage is not what you think it is. It is saving to players computer only.

    If you want global webstorage, you need an external database, which is going to be far beyond your current skill level. There are tuts on it using mysql (I think) but that is pretty advanced an requires actual programming knowledge.

    I don't understand your highscore1 and highscore2,

    But highscore is highscore and should be over written with new highscore.

    Highscore = 5000

    PlayerScore >= Highscore then Set Highscore = PlayerScore else Leave Highscore = Highscore.

    But like i said, global highscore cannot be stored using anything in construct, you need to use external storage options.

    Edit:

    Global Highscore is players wanting to beat the best score of the game.

    or

    Player wanting to beat his current best score? which you don't need an external database. Because if you just want player competing against his best score then, webstorage will work.

    Edit 2: Added 2 files. One is highscore example. As you can see it stores highscores, but the high scores are not persistent, when you exit game, you loose highscores.

    You need to save them to webstorage to make them persistent.

    So attachment to is something I did for someone else, it is saving gold coins to webstorage.

    Your homework assignment is to make the highscores save to webstorage. Oh, I will not be checking your homework, because in life, you have to be your own teacher and student.

    Saving to external database is too advanced for you, so I am not even going into that.

    i'm sorry,forget to say thanks

  • THANK YOU SO MUCH FOR THIS! I have been searching all over the Internet for help on the high scores, and this actually worked! Thank you Dutoit!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)