Library: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Quenty
Added RbxGear
>JulienDethurens
Redirected page to RbxLibrary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Stub}}
#REDIRECT [[RbxLibrary]]
 
== What is a library? ==
 
In [[Roblox]], the term '''library''' doesn't mean "an educational, academical place to gain informational knowledge."  Rather, libraries in Roblox are simply extensions of the API, which include developer-created Lua code which can be included in any script with ease.
 
== How do I use a library? ==
 
To find out what methods are in the library, you can first check for documentation on the wiki, or search the forums. If they both come up with nothing, you'll probably need to do lots of experimenting. Here's some base code to use:
<pre>
LoadLibrary("RbxGui")
</pre>
That loads the contents of [[RbxGui]], a library. However, we need to store it in a [[variable]].
<pre>
local RbxGui = LoadLibrary("RbxGui")
</pre>
Now, to see the contents, we can use a simple loop, with the handy GetApi method:
<pre>
for key, val in pairs(RbxGui:GetApi()) do
    print(key .. " = " .. val)
end
</pre>
That will print pretty much everything in the table out for us, so we know at least what there is in there.
 
== What libraries currently exist? ==
*[[RbxGui]]
<!--*[[RbxGear]] (This library is under development and currently only contains properties that seem to've been used to test libraries.)-->
*[[RbxUtility]]
*[[RbxStatus]]
*[[RbxGear]]

Latest revision as of 03:14, 19 January 2012

Redirect to: