Garry's Mod Wiki

table.RemoveByValue

any table.RemoveByValue( table tbl, any val )

Description

Removes the first instance of a given value from the specified table with table.remove, then returns the key that the value was found at.

Avoid usage of this function. It does not remove all instances of given value in the table, only the first found, and it does not work with non sequential tables!

Arguments

1 table tbl
The table that will be searched.
2 any val
The value to find within the table.

Returns

1 any
The key at which the value was found, or false if the value was not found.

Page Links


Special Pages


Wikis

?

Render Time: 81ms

DB GetPage 46
Generate Html 7
SaveChanges (1) 13
Render Body 0
Render Sidebar 12