invalid order function for sorting
i have no idea at all what i’m doing wrong.
table.sort(newTable, function(a, b)
local aPower = gameData.Pets[a.Name].Power local bPower = gameData.Pets[b.Name].Power if a.Big == true and a.Gold == false then aPower *= 1.20 end if a.Big == true and a.Gold == true then aPower *= 1.70 print(aPower) end if a.Huge == true and a.Gold == false then aPower *= 1.50 end if a.Huge == true and a.Gold == true then aPower *= 2 end if a.Equipped == b.Equipped then return aPower > bPower end return a.Equipped and not b.Equipped end)