GetBaseCategories (Function): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>GoldenUrg
initial
>GoldenUrg
use example template
Line 11: Line 11:
* { -- [[Table|List Table]]  
* { -- [[Table|List Table]]  
** { -- [[Table|Hash Table]]
** { -- [[Table|Hash Table]]
*** CategoryId = [[Integer]] for use with InsertService::GetCollection
*** AssetId = [[Integer]] for use with InsertService::LoadAsset()
*** ImageAssetId = [[Integer]] decal asset
*** AssetSetId = [[Integer]] source set
*** Name = [[String]] category name
*** AssetVersionId = [[Integer]] for use with InsertService::LoadAssetVersion()
*** Description = [[String]] category description
*** IsTrusted = [[Integer]] "trusted" flag
*** Name = [[String]] model name
*** CreatorName = [[String]] creator name  
*** CreatorName = [[String]] creator name  
*** AssetSetId = [[Integer]] for use with InsertService::GetCollection
*** SetType = [[String]] "base" for built-in categories
** }
** }
* }
* }


== Example ==
{{Example|
<pre>  
<pre>local categories = Game:GetService("InsertService"):GetBaseCategories()  
local categories = Game:GetService("InsertService"):GetBaseCategories()  
for ndx,catinfo in ipairs( categories ) do  
for ndx,catinfo in ipairs( categories ) do  
print( ndx )  
print( ndx )  
Line 29: Line 27:
end
end
</pre>
</pre>
}}

Revision as of 04:11, 19 April 2010

GetBaseCategories( )
Returns Table (See below)
Description: Returns the common base categories of all players.

Table Format

This format is used with AdvancedResults is set (the default):

Example
local categories = Game:GetService("InsertService"):GetBaseCategories() 
for ndx,catinfo in ipairs( categories ) do 
print( ndx ) 
for k,v in pairs(catinfo) do print( k, "=", v ) end 
end