Enumeration: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
no edit summary
>NXTBoy (It's an Enumeration, not an Enumerator. One is a set of values, the other is something (such as a function) that enumerates over such a set.) |
>NXTBoy No edit summary |
||
Line 1: | Line 1: | ||
{{Map|Scripting|Data Types}} | {{Map|Scripting|Data Types}} | ||
An '''Enumeration''', or '''Enum''', is a special data type that | An '''Enumeration''', or '''Enum''', is a special data type that can take one of a set of values. For example, the [[SurfaceType (Enum)|SurfaceType]] enum is used to select what type of surface a brick has on a certain side, which can take the values "Glue", "Hinge", "Inlet", or a few more. These values act as constants in place of using ambiguous numbers or strings to set a value. You can use the [[Object Browser]] to see a list of all of the enums. Additionally, you can see a list of the Enums that have been added to the wiki [[:Category:Enums|here]]. | ||
==Methods== | ==Methods== | ||
Line 8: | Line 8: | ||
! Method !! Description | ! Method !! Description | ||
|- | |- | ||
| GetEnumItems()||Acts exactly like the [[GetChildren]] method and returns a table of all the [[Enumeration#EnumItem|EnumItems]]. | | GetEnumItems() || Acts exactly like the [[GetChildren]] method and returns a table of all the [[Enumeration#EnumItem|EnumItems]]. | ||
|} | |} | ||