table.sort 排序的问题

** 开始写了一个排序一直报错 上代码:

    table.sort( normalTable, function ( b,a )
        local isSort = false
        if(b.tblItem.type ==2 and  b.tblItem.subType ~=21 and b.tblItem.subType ~= 22) then
            if(a.tblItem.type ~=2 or a.tblItem.subType ==21 or a.tblItem.subType == 22) then
                isSort = true
            end
        end
        return isSort
    end)
 
**上面这段代码一直报错  invalid order function for sorting   百度了下错误
原文地址:https://www.cnblogs.com/gwen-/p/13847974.html