<RetVar/IF> size of array <Var/Array>

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> size of array <Var/Array>

Post by mark_a_condren » Sat, 11. Sep 10, 17:00

[skip|else] if [not]|while [not]| <RetVar/IF> = size of array <Var/Array>


[skip|else] 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, otherwise if you use a Variable it will be the size of the selected array.
<Var/Array> = The array to get the size of.


Determines the size of an array and either assigns it to a variable, or uses it as a condition in an 'if', 'skip if', 'while' or other conditional statement.


Examples:

$array.size size of array $this.array

$array.size will be the number of elements contained in the array $this.array.

-----------------------------------

skip if size of array $station.array
| $station.array = $sector get station array from sector

You may have very recently gotten the station array for this $sector and if the script has not been exited, there may be no need to re get it, but if there is no size to the array, it will run the 'get station array from sector' command.


Command Location:

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

[39]286713

Post by Juggernaut93 » Wed, 29. Aug 12, 11:06

[skip|else] if [not]|while [not]| <RetVar/IF> = size of array <Var/Array>


[skip|else] if [not]|while [not]| = La possibile istruzione condizionale che può essere usata con questo comando.
<RetVar/IF> = Il valore di ritorno del comando; se si usa un'istruzione 'if' sarà TRUE (1) se la condizione è vera o FALSE (0) in caso contrario, mentre, se usi una variabile, essa assumerà il valore della dimensione dell'array selezionato.
<Var/Array> = L'array di cui ottenere la dimensione.


Determina la dimensione di un array e la assegna a una variabile oppure la usa come condizione per un 'if', 'skip if', 'while' o un'altra istruzione condizionale.


Esempi:

$array.size size of array $this.array

$array.size assumerà come valore il numero di elementi contenuti nell'array $this.array.

-----------------------------------

skip if size of array $station.array
| $station.array = $sector get station array from sector

Potresti aver recentemente ottenuto l'array di stazioni per il settore $sector e se non si è usciti dallo script, potrebbe non esserci la necessità di riottenerlo, ma se l'array non ha dimensione, sarà eseguito il comando 'get station array from sector'.


Posizione dell'istruzione nella lista:

Locked

Return to “MSCI Reference”