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..."
>JulienDethurens
No edit summary
Line 3: Line 3:
|arguments = [[string]] <var>library</var>
|arguments = [[string]] <var>library</var>
|returns = [[RbxLibrary]]
|returns = [[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>:
<code lua>
local RbxGui = assert(LoadLibrary('RbxGui'))
</code>


==See Also==
==See Also==

Revision as of 06:39, 7 February 2012

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