LinkofLight
Member
So I am in a interesting predicament.
I have 15 variables called "order1_x" and the 1 is replaced by every number up to 15. These variables can hold a value from .1 to 30 and the numbers are always a rounded to the first decimal place. I have used these variables all over my code and its a bit to late to change everything to change the variables into an array (my fault I didn't do that in the first place).
I need to order the variables in a list from least to greatest, but keep the variables in order.
Example
I really wish I made it an array from the start, but it would be way harder to change everything then just figuring this out.
Any help is appreciated, Thanks!
I have 15 variables called "order1_x" and the 1 is replaced by every number up to 15. These variables can hold a value from .1 to 30 and the numbers are always a rounded to the first decimal place. I have used these variables all over my code and its a bit to late to change everything to change the variables into an array (my fault I didn't do that in the first place).
I need to order the variables in a list from least to greatest, but keep the variables in order.
Example
Code:
order1_x == 10.4;
order2_x == 2;
order3_x == 4.5;
//I need code to make it.
order1_x == 2;
order2_x == 4.5;
order3_x == 10.4;
Any help is appreciated, Thanks!