Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Get the label, if any, associated with a game object... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var labelName = getLabel(object); |
Parameters
Parameter | Type | Mandatory | NotesWarzone | VersionGame version |
---|---|---|---|---|
object | The object to inspect. | 3.2 |
Return value
Value | Type | NotesWarzone | VersionGame version |
---|---|---|---|
<labelName> | String | If the object has a label, the name of the label will be returned. If an object has multiple labels, only the first label found will be returned. | 3.2 |
null | Null | The object is not labelled. | 3.2 |
<error> | Error | An error occurred, most likely invalid parameters. | 3.2 |
Notes
Be careful not to name call a variable "label" as that's also the name of a global function: label()
Example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var theLabel = getLabel(someObject); |
Div | ||
---|---|---|
| ||
This is a relatively slow operation of O(n) algorithmic complexity. |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Include Page | ||||
---|---|---|---|---|
|