|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
mark_a_condren

Joined: 03 Aug 2005 Posts: 1384 on topic Location: Newcastle - Australia

 |
Posted: Wed, 8. Dec 10, 15:19 Post subject: <RetVar/IF><RefObj> add <Var/Number> units of <Var/Ware> |
|
|
[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> add <Var/Number> units of <Var/Ware>
[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = If the command is to 'return' information. If a variable is used, This command will return TRUE on success, FALSE on failure. (Note: Apparently, When using on HQ class stations the command always returns 0.)
<RefObj> = The 'Object' that the command is to be run on. 'Valid' objects can be a 'Ship or Station'.
<Var/Number> = The quantity of the ware to be added as an integer.
<Var/Ware> = The ware that is to be added.
Adds the specified units of <Var/Ware> to the cargo hold of <RefObj> as long as there is enough room to hold it.
Example:
= $ship -> add 100 units of Energy Cells
This will add 100 units of Energy Cells to the specified ship $ship
By using the = (No return value) a variable is not set and there is no way to determine if the command was successful or not. This must be then dertermined via an alternative method if required.
Command Location:
Last edited by mark_a_condren on Fri, 24. Aug 12, 10:10; edited 1 time in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
X2-Illuminatus Moderator (Deutsch)

 
Joined: 02 Apr 2006 Posts: 14816 on topic

|
Posted: Fri, 17. Dec 10, 13:21 Post subject: [TiP][49] 292828 |
|
|
[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> add <Var/Number> units of <Var/Ware>
[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Wird benötigt, wenn der Befehl eine Information zurückgeben soll. Wenn eine Variable genutzt wird, wird dieser Befehl im Erfolgsfall TRUE (wahr), im Fehlerfall FALSE (falsch) zurückgeben. (Eine Ausnahme hiervon bilden HQ-Stationen, bei diesen wird immer FALSE (falsch) zurückgegeben.)
<RefObj> = Das Objekt, auf dem der Befehl ausgeführt werden soll. Zulässige Objekte sind Schiffe oder Stationen.
<Var/Number> = Die Anzahl der Ware, die hinzugefügt werden soll, als ganze Zahl.
<Var/Ware> = Die Ware, die hinzugefügt werden soll.
Fügt die gewählten Einheiten von <Var/Ware> dem Frachtraum von <RefObj> hinzu, solange genügend Platz frei ist.
Beispiel:
= $ship -> add 100 units of Energiezellen
Dies wird 100 Einheiten Energiezellen dem gewählten Schiff $ship hinzufügen.
Indem man = (kein Rückgabewert) nutzt, wird keine Variable gesetzt und es gibt keine Möglichkeit herauszufinden, ob der Befehl erfolgreich war oder nicht. Dies müsste dann auf andere Weise ermittelt werden, falls die Information benötigt wird.
Zu finden unter:
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|