[Solved] I'm having troubles with setting high score save order.

Chargeit

  • Posts: 9
I've set up a high score list. the problem i'm having is I can get the high score to pick up. but the highest score replace's all scores with the highest one. any idea what i'm doing wrong?


« Last Edit: December 27, 2011, 11:08:47 am by Chargeit »
>=>

Abigayl

  • Posts: 807
If you insert into a list instead of replacing, you move all of the other list items one down... in fact in your case, you are moving them two down with a new score since the 0 item becomes the 1 item so in the second if, you are comparing against the SAME item (so either nothing happens or both get added). Your original data is still there, just two down (so 0 is now 2, etc.).
If you need help, please check my tutorials either here or Kongregate (http://www.kongregate.com/accounts/Abigayl) or come over to my stream: http://www.livestream.com/poweredbyflowers

Chargeit

  • Posts: 9
     Cool thanks again for the help.  but yea I can get it to just compare and replace the #0 item.  the way I had it set up there it compared all the listed items and replaced all if it > then the listed items.

      the problem I'm having is i'm trying to get it to compare the 1st item (#0 in this case) then if scores not > then #0 to compare to 1# and if scores higher then 1 replace replace it as 1 move 1 down to 2 and so on.  sorry if my terms aren't up to par.

     I want to be able to keep track of the top 5 scores. but I also want a score to be added to the list even if it isn't more then the highest score. as long as it higher then 1 score on the list u see.


Just thought about it. I might try and add  Not to the If bar.

Ok I now how it to where it compares the 1st 2. but  doesn't move down the the list. (the last pic didn't work still replaced all.)



« Last Edit: December 27, 2011, 10:40:29 am by Chargeit »
>=>

Chargeit

  • Posts: 9
     Ok this is what works. This now compares the 1st score on list then if its not >= the score it moves to the next and if that one isn't >= the score it moves to the next..

Hope this helps some one making a high score list.
>=>