Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.

BeastNode

CommandHelper/Staged/API/array

From EngineHub.org Wiki
Jump to: navigation, search



Vital Info

Name array
Returns array
Usages [var1, [var2...]]
Throws
Since 3.0.1
Restricted
No
Optimizations OPTIMIZE_DYNAMIC

Description

Creates an array of values.

Usages

array([var1, [var2...]])

Examples (How do these work?)

Example 1

Basic usage

Given the following code:

1   assign(@arrayarray(1, 2, 3))
2   msg(@array)


The output would be:

{1, 2, 3}

Example 2

Associative array creation

Given the following code:

1   assign(@arrayarray(one: 'apple', two: 'banana'))
2   msg(@array)


The output would be:

{one: apple, two: banana}


See Also

Learning Trail: Arrays, Learning Trail: Array Iteration



Navigation menu