hookshy Well-Known Member Licensed User Longtime User Sep 30, 2013 #1 I has some trouble in sorting the scores of a game using simple and yet complicated sort function of lists. The sort function sorts correctly as long as all elements are same type : strings or number The following code sorts the scores , that you could save aferwards on you sd card as list of strings. Code: Copy For i=0 To rank.Size-1 Dim temp As Int temp=rank.Get(i) rank.RemoveAt(i) rank.InsertAt(i,temp) Next rank.Sort(True) 'sorts ascending the list diplay_rank ' function to display the list
I has some trouble in sorting the scores of a game using simple and yet complicated sort function of lists. The sort function sorts correctly as long as all elements are same type : strings or number The following code sorts the scores , that you could save aferwards on you sd card as list of strings. Code: Copy For i=0 To rank.Size-1 Dim temp As Int temp=rank.Get(i) rank.RemoveAt(i) rank.InsertAt(i,temp) Next rank.Sort(True) 'sorts ascending the list diplay_rank ' function to display the list