Organizing a table from greatest to least?

I’d like to organize the values in a table from greatest to least. I could do this myself but it would be messy.

I want to know if there is a quick way of doing this?

It is in no way the cleanest way, but my suggestion is to look up sorting algorithms, and giving them a shot. Try to implement them yourself, and you’ll learn a LOT about sorting!
For instance, the bubble sort mechanism is by far not the quickest or the cleanest, but it’s pretty simple.

I also suggest having a look at how some of these functions are coded in Garry’s Mod, it might help you:

[lua]table.sort(tbl, function(a, b) return a > b end)[/lua]

That’s the easiest way. table.sort can take a function as its second argument, the above example basically means “place a before b if a is greater than b”.