<RetVar/IF><Var/Array>[<Var/Number>]

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

<RetVar/IF><Var/Array>[<Var/Number>]

Post by mark_a_condren » Sat, 11. Sep 10, 11:53

[skip] if [not]|while [not]| <RetVar/IF> = <Var/Array> [ <Var/Number> ]


[skip] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Command return, with an 'if' statement used it will be TRUE (1) if condition passes or FALSE (0) if it fails, orherwise if you use a Variable it will be the value of thr selected array at the selected index.
<Var/Array> = The required array name.
<Var/Number> = The index (element) in the required array.


Allows you to assign the value of an array element to a variable, or to create a condition or
while loop based on whether the element is set to a value or is null.


Example:

$array.item = $array.1 [ 0 ]

$array.item will be the value from $array.1 at the selected index, in this case, element zero [ 0 ].


Command Location:
Last edited by mark_a_condren on Sat, 11. Sep 10, 12:31, edited 1 time in total.

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

[TiP][49] 286696

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

[skip] if [not]|while [not]| <RetVar/IF> = <Var/Array> [ <Var/Number> ]


[skip] if [not]|while [not]| = Eine mögliche Bedingung, die mit dem Kommando verwendet werden kann.
<RetVar/IF> = Kommandorückgabe, wenn mit einer if-(Wenn)-Abfrage verwendet, wird TRUE (1) (Wahr) für den Fall zurückgegeben, dass die Bedingung erfüllt ist, und FALSE (0) (Falsch), wenn nicht. Für den Fall, dass eine Variable verwendet wird, wird diese als Wert für das gewählte Array im entsprechenden Index verwendet.
<Var/Array> = Der angeforderte Names des Arrays.
<Var/Number> = Das Listenelement im angeforderten Array.

Das Kommando erlaubt es, den Wert eines Arrayselements einer Variabele oder eine Bedingungsabfrage oder while-(während)-Schleife zu zuordnen, basierende darauf, ob das Element eine Variable ist oder null.

Beispiel:

$array.item = $array.1 [ 0 ]

$array.item ist der Wert von $array.1 in der ausgewählten Liste, in diesem Fall Element Null [ 0 ].


Zu finden unter:

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

[39]286696

Post by Juggernaut93 » Sun, 22. Jul 12, 17:08

[skip] if [not]|while [not]| <RetVar/IF> = <Var/Array> [ <Var/Number> ]


[skip] if [not]|while [not]| = Le possibili istruzioni condizionali che possono essere usate con questo comando.
<RetVat/IF> = Il ritorno del comando; se viene usata un'istruzione "if" sarà TRUE (1) se la condizione passa o FALSE (0) se fallisce, altrimenti, se usi una variabile, essa assumerà il valore dell'array selezionato all'indice selezionato.
<Var/Array> = Il nome dell'array richiesto.
<Var/Number> = L'indice (l'elemento) nell'array richiesto.


Ti permette di assegnare il valore di un elemento di un array a una variabile o di creare una condizione o un loop "while" in base a se un elemento è impostato su un valore o se invece assume valore null.


Esempio:

$array.item = $array.1 [ 0 ]

$array.item assumerà il valore di $array.1 all'indice selezionato, in questo caso l'elemento zero [ 0 ].


Posizione dell'istruzione nella lista:

Locked

Return to “MSCI Reference”