Garry's Mod Wiki

Revision Difference

table.RemoveByValue#568571

<function name="RemoveByValue" parent="table" type="libraryfunc"> <description>Removes only the first instance of the given value from the specified table. If the key of the value is a number, the value is removed using <page>table.remove</page>.</description>⤶ <description>⤶ Removes only the first instance of the given value from the specified table. ⤶ ⤶ If the key for the value is a number, it will be removed using <page>table.remove</page>. In all other cases, keys will have their values set to `nil`.⤶ </description>⤶ <realm>Shared and Menu</realm> <file line="700-L713">lua/includes/extensions/table.lua</file> <file line="703-L716">lua/includes/extensions/table.lua</file> <args> <arg name="tbl" type="table">The table that will be searched.</arg> <arg name="val" type="any">The value to find within the table.</arg> <arg name="value" type="any">The value to find within the table.</arg> </args> <rets> <ret name="" type="any">The key at which the value was found, or false if the value was not found.</ret> <ret name="" type="any">The key at which the value was found, or `false` if the value was not found.</ret> </rets> </function>