Cargo.Remainder:Cargo                      (read/write)

Remaining cargo after partial operation. If an operations like CargoUnload cannot finish completely, because of lacking cargo or cargo room, it can be told to do as much as possible instead of failing using the "n" flag. In this case, it stores the amount of unprocessed cargo in this variable.

If a local variable Cargo.Remainder is visible, the result is stored in that instead of the global one. It is therefore a good idea to define a local variable to capture results without disturbing or being disturbed by other scripts.

This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.