I looked on the wiki it didnt help me much to remove strings from the table... :/
Any idea's?
01 | Owners = { 'MessorAdmin' } ; |
02 |
03 | Instance_CMD( 'Unadmin' , 1 , function (Plr,Msg) |
04 | for _,v in pairs (FindReturnPlayer(Plr,Msg)) do -- Returns a table |
05 | ---------------------------------------------- |
06 | for _,p in pairs (Owners) do |
07 | if p:lower() = = v.Name:lower() then print (p) -- Returns my name from the FindPlayerTable return. |
08 | table.remove(Owners,_) wait() -- This is the error line. Im not sure why its not removing my name. |
09 | Note(Plr, 'Removed ' ..Msg.. ' Admin!' ,( 85 / 255 / 0 )) -- This outputs after but my name is not removed?!?!? |
10 | end |
11 | end |
12 | --- |
13 | end |
14 | 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,_)