<RetVar/IF><RefObj> get max. store amount of ware <Var/Ware>

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24969
Joined: Sun, 2. Apr 06, 16:38
x4

<RetVar/IF><RefObj> get max. store amount of ware <Var/Ware>

Post by X2-Illuminatus » Thu, 7. Apr 11, 22:45

[skip|else] if [not]|while [not]|<RetVar/IF><RefObj> get max. store amount of ware <Var/Ware>


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Use a variable, if the command should return information. If a variable is used, it will return the maximum amount of <Var/Ware> that can be stored in the <RefObj>.
<RefObj> = The station that stores <Var/Ware>.
<Var/Ware> = The ware you want to know its amount.


Returns the maximum amount of the as <Var/Ware> selected ware that can be stored in the as <RefObj> selected station. This will not consider the amount already stored in the station.


Example:

$target = get player tracking aim
$ware = $target -> get product ware
$amount = $target -> get max. store amount of ware $ware
write to player logbook: printf: fmt='The maximum amount of %s that can be stored in %s is %s.', $ware, $target, $amount, null, null
return null

Assuming the current player $target is a factory, this will get the maximum amount of its product (in case the factory has more than one product, it will be the first listed) that can be stored in that station and writes it with an appropriate message to the logbook.


Related Commands:

<RetVar/IF><RefObj> get best store amount of ware <Var/Ware>


Command Location:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24969
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 299498

Post by X2-Illuminatus » Wed, 4. May 11, 17:07

[skip|else] if [not]|while [not]|<RetVar/IF><RefObj> get max. store amount of ware <Var/Ware>


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Nutze eine Variable, wenn der Befehl eine Information zurückgeben soll. Wenn eine Variable genutzt wird, wird sie die größtmögliche Menge enthalten, die von <Var/Ware> auf dem <RefObj> gelagert werden kann.
<RefObj> = Die Station, die <Var/Ware> lagert.
<Var/Ware> = Die Ware, deren Menge du wissen möchtest.


Gibt die größtmögliche Menge von der als <Var/Ware> ausgewählten Ware zurück, die auf der als <RefObj> ausgewählten Station gelagert werden kann. Dies wird nicht die Menge berücksichtigen, die die Station bereits lagert.


Beispiel:

$target = get player tracking aim
$ware = $target -> get product ware
$amount = $target -> get max. store amount of ware $ware
write to player logbook: printf: fmt='Die größtmögliche Menge von %s, die auf %s gelagert werden kann, ist %s.', $ware, $target, $amount, null, null
return null

Vorausgesetzt das aktuelle Spielerziel $target ist eine Fabrik, wird dies die größtmögliche Menge des Produkts der Fabrik herausfinden und diese mit einer entsprechenden Nachricht in das Logbuch schreiben. (Sollte die Fabrik mehrere Produkte produzieren, wird es die Menge vom ersten gelisteten sein.)


Verwandte Befehle:

<RetVar/IF><RefObj> get best store amount of ware <Var/Ware>


Zu finden unter:

Return to “MSCI Reference”