table.CopyFromTo

From GMod Wiki

Revision as of 21:16, 2 November 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax table.CopyFromTo( Table From, Table To )
Where is this used?
Description:
Make To exactly the same as From - but still the same table.
Returns: nil
Part of Library: Table
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Table.CopyFromTo]Table.CopyFromTo [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionExact lua code taken from table.lua.
Used onNewerShared.png
Code
function table.CopyFromTo( FROM, TO )
 
	// Erase values from table TO
	table.Empty( TO )
 
	// Copy values over
	table.Merge( TO, FROM )
 
end
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox