list.Get

From GMod Wiki

Jump to: navigation, search
Function
Syntax list.Get( String name )
Where is this used?
Description:
Returns a copy of the named list.
Returns: Table
Part of Library: list
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=List.Get]List.Get [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionAdds 2 items to a list, then prints it to the console.
Used onNewerShared.png
Code
 
list.Add( "myList", "Hello" )
list.Add( "myList", "World" )
local list_of_stuff = list.Get("myList")
PrintTable( list_of_stuff )
 
Output
1 = Hello
2 = World


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox