table.ForceInsert
From GMod Wiki
Function | |
Syntax |
table.ForceInsert( Table table, Var value ) Where is this used? |
Description: | |
Inserts a value into a table even if it's empty or doesn't exist. | |
Returns: | Table |
Part of Library: | Table |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Table.ForceInsert]Table.ForceInsert [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Actual code of the function. |
---|---|
Used on | |
Code | function table.ForceInsert( t, v ) if ( t == nil ) then t = {} end table.insert( t, v ) return t end |
Output | N/A |