[WIP] <RetVar/IF><RefObj> get local variable: name = <Var/String>

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

Post Reply
Posts: 1385
Joined: Wed, 3. Aug 05, 05:05

[WIP] <RetVar/IF><RefObj> get local variable: name = <Var/String>

Post by mark_a_condren » Thu, 9. Sep 10, 10:07

[skip|else] if [not]|while [not]| <RetVar/IF> <RefObj> = get local variable name = <Var/String>

[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.

Further Resources:
Global Variables by Cycrow and includes info on Local Variables.

Command Location:

Post Reply

Return to “MSCI Reference”