We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want to sort a table, so I use the .sort();
function but when I save the table it looks like this:
1
1116
1232
206
2375
281
356
468
736
it seems like it sorts based on the first number and just acts like all the other numbers are decimal points, have I done something wrong?
Answers
How are your numbers stored? As numbers? Or... Strings?
@TfGuy44 They are stored as Intergers.
Are you sure? Let's see the code for that then.
Its part of a larger code but here are the functions that matter to the question
Here's a link to the highscore.csv file https://drive.google.com/file/d/0B5_vyYKbiszELUFHa1JJaGJZQ3c/view?usp=sharing
https://Forum.Processing.org/two/discussions/tagged?Tag=setcolumntypes()
@GoToLoop thank you,
highscoreRegister.setColumnType("points", Table.INT);
does the job :D@schotsl -- so to be clear, @TfGuy44 was right -- they were being sorted as strings / alphabetized, because of the default Table field type. There was no mysterious hidden decimal thing.