I have no idea what I screwed up but I was changing/adding permission levels and now when I enter the game it gives me the error
ServerScriptService.Basic Admin Essentials 2.0.MainModule:161: attempt to compare number < table
The line 161 function:
local function returnPermission(Player)
local Permission = 0
for a,b in next,sysTable.Permissions do
if b[1] and b[1] > Permission and b[2][tostring(Player.UserId)] then
Permission = b[1]
end
end
return Permission
end
b[1] is a table when it should be a number. You might have changed the type of something, or you changed the format of the loop. Look at the original module to fix it.
Maybe try this code instead:
for rankName,permissionTable in pairs(sysTable.Permissions) do
if (permissionTable[1]) and (permissionTable[1] > Permission) and (permissionTable[2][tostring(Player.UserId)]) then
Permission = permissionTable[1]
end
end
That didn’t fix and I did try copying the code for that from the original module and putting it their and nothing was changed and it still didnt work. I think its time… @r_r