of     1   

SilentBlockz
#184078959Sunday, February 21, 2016 4:34 PM GMT

I want to order numbers (Score) from highest to lowest and display them using text labels in a gui, can some one help me with that?
UnsourcedAnon
#184084017Sunday, February 21, 2016 5:49 PM GMT

There are two default functions in Lua that can be utilized to accomplish this task. Firstly, if you intend to utilize Lua tables to store the score data, we can use "sort" function to sort our table accordingly. Secondly, we can use the "concat" function to convert our table directly into a string. Here is an example: Scores = {5,10,7,3,8,6}; table.sort(Scores, function(x,y) return x > y end); Score_Menu.Text = table.concat(Scores, " "); Within the above example, I have a table known as "scores." The scores are numerically unsorted. The "sort" function accepts a table as its first input argument, and a subroutine/function as its second input argument. "x" and "y" represent two adjacent numbers within our table. The sort function will compare the quantities to determine which is greater/lesser via true/false data, and sort them accordingly. "concat" will convert a given table directly into a string. The second input argument, " ", merely specifies that we would like a space character to be inserted between each "child" or "member" of the table. Hopefully this will help you with your task.
SilentBlockz
#184084956Sunday, February 21, 2016 6:01 PM GMT

Thanks for the help!

    of     1