Found another error:
http://xelerus.de/index.php?s=functions&function=249
It does not return true on successful, it returns a pointer to the ship. See KorolovShipping.xml
Also, what is the fourth parameter? In KorolovShipping.xml it is nonexistent, in the prototype it says [string] and in the argument list it says spaceObj. What is it?