GetJobsInfo (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Blocco No edit summary |
>LocalChum No edit summary |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{locked}} | |||
<onlyinclude>{{Method | <onlyinclude>{{Method | ||
|name = GetJobsInfo | |name = GetJobsInfo | ||
Line 4: | Line 5: | ||
|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. | |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 | local n = 1 | ||
local ref=1 | local ref = 1 | ||
local refTable=game:GetJobsInfo()[1] | |||
print(refTable) --> table: [location in memory] | local refTable = game:GetJobsInfo()[1] -- This is the reference table. | ||
print( "Job #" .. n .. "'s " .. game:GetJobsInfo()[1][ref] .. " is " .. game:GetJobsInfo()[n+1][ref] .. ".") --> Job #1's name is ScriptReview. | |||
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