Currently I have a table of items that are sorted via their power:
local function Sorter(a, b)
local Decision = a[3] > b[3]
return Decision
end
The problem is, I want to sort it by power but if the power is == then I want it to be sorted by tier, I have an integer list assigned to each tier, example:
TierInformation.TierIntegers = {
["Common"] = 1;
["Rare"] = 2;
["Ultra-Rare"] = 3;
["Legendary"] = 4;
["Mystical"] = 5;
["VOID"] = 6;
}
This all works fine but when I try to implement this into the sorter function it errors, I tried doing this:
local function Sorter(a, b)
local Decision = a[3] > b[3] or a[4] > b[4] --3 is the power, 4 is the tier integer
return Decision
end
If anyone has any ideas on how to sort this it would be very much appreciated!