14.03.2014, 20:41
Well it does work with any enum and any variable (strings are only sorted by the first char)
If that is still the wrong thing could you explain it a bit more in depth ?
pawn Код:
enum eListInfo { l_int, l_str[10], Float:l_float }
new List[][eListInfo] = {
{2,"Test2",2.2},
{1,"Test1",1.1},
{4,"Test4",4.4},
{3,"Test3",3.3},
{5,"Test5",5.5}
};
enum eDataInfo { d_int, d_str[10], Float:d_float }
new Data[][eDataInfo] = {
{7,"Test3",1.1},
{4,"Test2",8.8},
{2,"Test5",3.3},
{8,"Test6",5.5},
{6,"Test9",7.7}
};
public OnFilterScriptInit() {
BubbleSort(List, l_int);
for(new i;i<sizeof(List);i++) printf("%d %s %.f",List[i][l_int],List[i][l_str],List[i][l_float]);
BubbleSort(Data, d_float);
for(new i;i<sizeof(Data);i++) printf("%d %s %.f",Data[i][d_int],Data[i][d_str],Data[i][d_float]);
}