My error : bad argument #2 to 'remove' (number expected, got table)
Settings = {
Ranked = { -- 3=Owner, 2=Admin, 1=Member, 0=nil, -.5=Muted, -1=Banned
{Name = "Player",Rank = 3};
{Name = "Idiot",Rank = -.5};
},
}
for _,v in pairs(Settings.Ranked) do
local msg = msg:lower()
local sub = msg:sub(7)
local data = v.Name:lower()
local num = tonumber(-.5)
if msg == 'all' and v.Rank == num or data:find(sub) and v.Rank == num then
table.remove(Settings.Ranked, v) -- Error here
end
end

1 comment
I tryed v[1] but it wouldnt remove the correct ban.