GetJobsInfo (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy fix |
>LocalChum No edit summary |
||
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{locked}} | |||
<onlyinclude>{{Method | <onlyinclude>{{Method | ||
|name = GetJobsInfo | |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 = DataModel | |object = DataModel | ||
|protected = yes | |||
}}</onlyinclude> | }}</onlyinclude> | ||
Line 11: | Line 13: | ||
If you are using the [[Command Bar]] or a [[CoreScript]]... | If you are using the [[Command Bar]] or a [[CoreScript]]... | ||
<pre> | <pre> | ||
local n = 1 | |||
print( game:GetJobsInfo()[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> | </pre> | ||
If you are using a [[Script]] or a [[LocalScript]]... | If you are using a [[Script]] or a [[LocalScript]]... |
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