LoadLibrary (Function): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens No edit summary |
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>" Tags: mobile web edit mobile edit |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude>{{Function | <onlyinclude>{{Function | ||
|name = LoadLibrary | |name = LoadLibrary | ||
|arguments = | |arguments = {{type|string}} <var>library</var> | ||
|returns = | |returns = {{type|RbxLibrary}} | ||
|description = Loads a library and returns it. If <var>library</var> is not the name of a valid library, | |description = Loads a library and returns it. If <var>library</var> is not the name of a valid library, {{false}} is returned, as well as an error message. | ||
}}</onlyinclude> | }}</onlyinclude> | ||
Line 12: | Line 12: | ||
This code would load the [[RbxGui (Library)|RbxGui]] library and store it in the variable <var>RbxGui</var>: | This code would load the [[RbxGui (Library)|RbxGui]] library and store it in the variable <var>RbxGui</var>: | ||
< | <syntaxhighlight lang="lua"> | ||
local RbxGui = assert(LoadLibrary('RbxGui')) | local RbxGui = assert(LoadLibrary('RbxGui')) | ||
</ | </syntaxhighlight> | ||
==See Also== | ==See Also== |
Latest revision as of 05:29, 27 April 2023
LoadLibrary( string library ) | |
Returns | RbxLibrary |
Description: | Loads a library and returns it. If library is not the name of a valid library, false is returned, as well as an error message. |
Example
This code would load the RbxGui library and store it in the variable RbxGui:
local RbxGui = assert(LoadLibrary('RbxGui'))