
-----------------------------------
mnorman
Mon May 16, 2011 11:18 am

High score help
-----------------------------------
Im trying to make a simple highscore table but im having problem displaying the score



im trying to use font.draw to display the text but when i try to use an interger varable turing dosent like it

 also how to i get it to display from highest to lowest in stead of lowest to highest 

ive trie using font. set but it dosent work either







 score (1) then
        newIndex := 1

    else
        for k : 1 .. 9
            if userScore < score (k) and userScore > score (k + 1) then
                newIndex := (k + 1)
            end if

            if userScore = score (k) then
                newIndex := k
            end if
        end for
    end if

    if newIndex not= 0 then
        for decreasing j : 10 .. (newIndex + 1)
            names (j) := names (j - 1)
            score (j) := score (j - 1)
        end for


        names (newIndex) := name
        score (newIndex) := userScore
    end if

end sort
var words : string
if choice = "y" then
    sort
    cls
    for i : 1 .. 10
        Font.Draw (getRank (score (i)), 25, i * 40, font1, green)
        Font.Draw (names (i), 350, i * 40, font1, green)
        Font.Draw (i, 0, i * 40, font1, green)
        Font.Draw (score (i), 500, font1, green)
    end for
elsif choice not= "y" then
    cls
end if>



-----------------------------------
Zren
Mon May 16, 2011 11:33 am

RE:High score help
-----------------------------------


Would return a string. Eg: 10 -> "10".

-----------------------------------
mnorman
Tue May 17, 2011 10:37 am

RE:High score help
-----------------------------------
thanks i looked that up in index but it looked complicated, turns out its simple
