I looked on the wiki it didnt help me much to remove strings from the table... :/
Any idea's?
Owners={'MessorAdmin'}; Instance_CMD('Unadmin',1,function(Plr,Msg) for _,v in pairs(FindReturnPlayer(Plr,Msg)) do -- Returns a table ---------------------------------------------- for _,p in pairs(Owners) do if p:lower()==v.Name:lower() then print(p) -- Returns my name from the FindPlayerTable return. table.remove(Owners,_) wait() -- This is the error line. Im not sure why its not removing my name. Note(Plr,'Removed '..Msg..' Admin!',(85/255/0)) -- This outputs after but my name is not removed?!?!? end end --- end end)
You have two indexes of _
. Hope that helps you out.
*Add an end before you do the other _, whatever in pairs
table.remove() needs 2 arguments: the table, and the position of the thing we're removing.
So, do table.remove(Owners,#_)
instead of table.remove(Owners,_)