table.HasValue
From GMod Wiki
Function | |
Syntax |
table.HasValue( Table table, Var value ) Where is this used? |
Description: | |
Checks if a table has a value. | |
Returns: | Boolean |
Part of Library: | Table |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Table.HasValue]Table.HasValue [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Additional Notes
- The "value" parameter can be any data type, but must be the same data type within the table.
Table = {"String", "Table"} table.HasValue(Table, "String") -- This will work, as both data types are strings table.HasValue(Table, 1) -- This will not work, as it's comparing a number with a string.