table.ClearKeys

From GMod Wiki

Jump to: navigation, search
Function
Syntax table.ClearKeys( Table table, Boolean savekeys )
Where is this used?
Description:
Changes a tables keys into integers.
Returns: Table
Part of Library: Table
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Table.ClearKeys]Table.ClearKeys [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionMakes returned constraint data use an integer-keyed table.
Used onNewerShared.png
Code
local keytable = constraint.GetAllConstrainedEntities(ent)
	tables = table.ClearKeys(keytable)
	print(tables[1])
 
OutputPrints the first entry in the newly keyed table.

Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox