Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Returns a list of all currently defined labels... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var list = enumLabels(); |
Parameters
The function has no parameters.
Return value
Value | Type | Description | Game version |
---|---|---|---|
<list> | Array of String | A list of label names currently registered with the JS API. Use label() to get the object associated with a label. | 3.2 |
[] | Empty Array | If there are no labels yet, an empty array is returned. | 3.2 |
Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
enumLabelenumLabels().forEach( function getObjectFor(labelName) { var obj = label(labelName); // retrieve object if (obj) { // do stuff with object } else { // there are no objects associated with this label } } ); |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Include Page | ||||
---|---|---|---|---|
|