[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, the command will return 1 on success and null on failure.
<RefObj> = The ship that should transport the <Var/Ware>.
<Var/Ware> = The ware that should be transported by the <RefObj>.
This command will check if the as <RefObj> selected ship can transport the as <Var/Ware> selected ware. However, it will only check if the <RefObj> has the correct transport class, not if it has enough free cargo space.
Example:
$ware = 5 MJ shield
$result = [PLAYERSHIP] -> can transport ware $ware
if $result == 1
|write to player logbook: printf: fmt='%s has the right transport class to transport %s', [PLAYERSHIP], $ware, null, null, null
else
|write to player logbook: printf: fmt='%s hasn't the right transport class to transport %s', [PLAYERSHIP], $ware, null, null, null
end
return null
This will check, if the [PLAYERSHIP] has the right transport class to transport the ware 5 MJ shield. An appropriate message will be written to the player logbook.
Command Location:
- »» Trade Commands
- »» for Ships
<RetVar/IF><RefObj> can transport <Var/Ware>
- »» for Ships