<Var/Array>[<Var/Number>] = <Value>

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Locked
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

<Var/Array>[<Var/Number>] = <Value>

Post by mark_a_condren » Sat, 11. Sep 10, 13:32

<Var/Array> [ <Var/Number> ] = <Value>


<Var/Array> = The array to put the value into.
<Var/Number> = The array index (element) position for the value.
<Value> = What is to be inserted into the array.


Allows you to set the value of the element of an array.
The array must have previously been allocated the correct number of elements.
You cannot expand the number of elements in an array with this instruction.


Example:

$value = 10
$array.1 [ 5 ] = $value

This will insert the value 10 into array $array.1 at index 5 [ 5 ].


Command Location:

Alex Vanderbilt
Winner X3 Sektorquest
Posts: 2127
Joined: Thu, 4. May 06, 12:07
x3tc

[TiP][49] 286698

Post by Alex Vanderbilt » Sun, 3. Oct 10, 17:25

<Var/Array> [ <Var/Number> ] = <Value>

<Var/Array> = Das Array, in das der Wert eingesetzt werden soll.
<Var/Number> = Die Position auf der Liste, wo der Wert hin soll.
<Value> = Die Information, die in das Array eingetragen werden soll.

Das Kommando erlaubt es, einen Wert für ein Element eines Arrays festzulegen.
Im Vorfeld muss das Array die korrekten Nummern für die Elemente festgelegt haben.
Mit diesem Kommando kann man die Nummer von Elementen in einem Array nicht erhöhen!

Beispiel:

$value = 10
$array.1 [ 5 ] = $value

Hier wird der Wert 10 in das Array $array.1 am Listenpunkt 5 [ 5 ] eingesetzt.


Zu finden unter:

User avatar
Juggernaut93
Posts: 2897
Joined: Sun, 17. Jul 11, 21:03
x4

[39]286698

Post by Juggernaut93 » Sat, 18. Aug 12, 17:10

<Var/Array> [ <Var/Number> ] = <Value>


<Var/Array> = L'array in cui inserire il valore.
<Var/Number> = L'indice (cioè l'elemento) dell'array in cui inserire il valore.
<Value> = Il valore che deve essere inserito nell'array.


Ti permette di impostare il valore di un elemento di un array.
Nell'array deve essere stato precedentemente allocato il corretto numero di elementi.
Non puoi espandere il numero di elementi in un array con questa istruzione.


Esempio:

$value = 10
$array.1
[ 5 ] = $value

In questo modo il valore 10 sarà inserito nell'array $array.1 all'indice 5 [ 5 ].


Posizione dell'istruzione nella lista:

Locked

Return to “MSCI Reference”