GetJobsInfo (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy fixed |
>LocalChum No edit summary |
||
(21 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude>{{Method|name = GetJobsInfo | {{locked}} | ||
<onlyinclude>{{Method | |||
|name = GetJobsInfo | |||
|returns = [[Table]] ''jobsInfo'' | |returns = [[Table]] ''jobsInfo'' | ||
|description = Returns | |description = Returns a '''table''' containing the jobs performed by the game, and one ''reference table''. The ''reference table'' contains the names of the values in the other tables. | ||
|object = | |object = DataModel | ||
|protected = yes | |||
}}</onlyinclude> | }}</onlyinclude> | ||
{{clear floats}} | |||
{{Example| | |||
If you are using the [[Command Bar]] or a [[CoreScript]]... | |||
<pre> | |||
local n = 1 | |||
local ref = 1 | |||
local refTable = game:GetJobsInfo()[1] -- This is the reference table. | |||
print( refTable ) --> table: [location in memory] | |||
print( "Job #" .. n .. "'s " .. game:GetJobsInfo()[1][ref] .. " is " .. game:GetJobsInfo()[n + 1][ref] .. ".") --> Job #1's name is ScriptReview. | |||
</pre> | |||
If you are using a [[Script]] or a [[LocalScript]]... | |||
<pre> | |||
print( game:GetJobsInfo() ) --> s GetJobsInfo | |||
</pre>}} | |||
[[Category:Methods]] | [[Category:Methods]] |
Latest revision as of 23:00, 9 August 2011
Protected:This item is protected. Attempting to use it in a Script or LocalScript will cause an error.
GetJobsInfo( ) | |
Returns | Table jobsInfo |
Description: | Returns a table containing the jobs performed by the game, and one reference table. The reference table contains the names of the values in the other tables. |
Member of: | DataModel |
Example
If you are using the Command Bar or a CoreScript...
local n = 1 local ref = 1 local refTable = game:GetJobsInfo()[1] -- This is the reference table. print( refTable ) --> table: [location in memory] print( "Job #" .. n .. "'s " .. game:GetJobsInfo()[1][ref] .. " is " .. game:GetJobsInfo()[n + 1][ref] .. ".") --> Job #1's name is ScriptReview.
If you are using a Script or a LocalScript...
print( game:GetJobsInfo() ) --> s GetJobsInfo