(info) This AI is still in early stages of development.

Define.stateOf()

Check state of a specific global property...

 

Syntax

var result = Define.statusOf(name[, asString]);

Parameters

ParameterTypeMandatoryNotesAPI Version
nameString(tick)The name of the global property to test.1.0
asStringBoolean(error)

Should result be in string format?

  • true– yes, return a string
  • false – no, return a state constant

See "Return values" below for more information.

Default: false

1.0

Return values

ValueTypeNotesAPI Version
<result>Boolean

The state of the property:

1.0
<string>String

The state of the property as a string – one of:

  • "Missing"
  • "Removed"
  • "Added"
  • "Replaced"
  • "Native"
1.0

Example

Output state of scavengerPlayer property in human readable form...
console("scavengerPlayer is "+Define.stateOf("scavengerPlayer", true));

 

 

Availability STABLE

Requires:

Contents

Jump to:

Define API

Topics:

  • Define()Add, remove or redefine a property on the global scope, overriding any native property of the same name on the global object...
  • Define API DiagnosticsDiagnostic routines for Define API...
  • Define ScriptsA library of ready made scripts for the Define API...