A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: [RESOLVED] Determine wich variable is the highest

Threaded View

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    26

    resolved [RESOLVED] Determine wich variable is the highest

    Hey,

    simple question

    basicly i got 8 variables(players) with differend values(score)
    player1: score = 100
    player2: score = 90
    player3: score = 70
    player4: score = 60
    player5: score = 50
    player6: score = 40
    player7: score = 30
    player8: score = 20

    i will give players score at random
    and i want to create the most basic highscore possible for them
    how???

    i tryed to come up with simple ideas to implement it like
    if(player8) => player1234567
    player 8 = position 1
    if(player7) =>player1234568...well that doesnt work since 8 is already listed and it all gets messed up

    cant think of a simple idea to implement this,
    if there a simple code that checks what value is biggest and ranks them somehow?
    or any of you have another simple idea to make the most basic highscore?

    think of it as a simple soccer game, after a match you need to see a list with the teams ranked in the season

    thx in advance
    Last edited by Kascas; 08-27-2013 at 09:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center