LoadLibrary (Function): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens
Created page with "<onlyinclude>{{Function |name = LoadLibrary |arguments = string <var>library</var> |returns = RbxLibrary |description = Loads a library and returns it. }}</onlyinclude..."
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
Tags: mobile web edit mobile edit
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude>{{Function
<onlyinclude>{{Function
|name = LoadLibrary
|name = LoadLibrary
|arguments = [[string]] <var>library</var>
|arguments = {{type|string}} <var>library</var>
|returns = [[RbxLibrary]]
|returns = {{type|RbxLibrary}}
|description = Loads a library and returns it.
|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>


{{clear floats}}
{{clear floats}}
==Example==
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'))
</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'))

See Also