GetAllPackages: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetAllPackages()}} {{FuncParameters}} {{FuncNoParam}} {{FuncReturnValue|__EDIT_ME__}} == Example..."
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server & Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Returns the name of packages in a table.}}


{{FuncSyntax|GetAllPackages()}}
{{FuncSyntax|GetAllPackages()}}
Line 8: Line 8:
{{FuncNoParam}}
{{FuncNoParam}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function returns a table with package names.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
local packages = GetAllPackages()
print(packages[1]) -- prints your first package in server config
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
*[[ImportPackage]]
*[[StartPackage]]
*[[StopPackage]]
*[[GetAllPackages]]
*[[GetPackageName]]
*[[IsPackageStarted]]
*[[GetPackageFiles]]

Latest revision as of 17:13, 30 December 2020

GetAllPackages

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Returns the name of packages in a table.

Syntax

GetAllPackages()

Parameters

  • This function has no parameters.

Return Value

  • This function returns a table with package names.

Example

local packages = GetAllPackages()
print(packages[1]) -- prints your first package in server config

See also