[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 information returned that was being stored.
<RefObj> = The ship or station that has had the information stored against it.
<Var/String> = The string that was previously set as the name for the information, this can be read in from a text file or entered directly as a string.
Returns the value of a previously set local variable (see: set local variable ).
If the local variable was not previously set, then this instruction returns null.
$info.being.stored = $station -> get local variable name = 'my_local_variable_name'
This command retrieves the stored information and stores it in $info.being.stored.
if $station -> get local variable name = 'my_local_variable_name'
| write to logbook = 'This station has information stored'
else if not $station -> get local variable name = 'my_local_variable_name'
| write to logbook = 'This station does not have information stored'
Using the 'Conditional' statement 'if' does not actually retrieve the information being stored, it just checks to see if it the local variable <Var/String> exists against the <RefObj> being checked.
Global Variables by Cycrow and includes info on Local Variables.
- »» General Commands
<RetVar/IF> <RefObj> = get local variable name = <Var/String>