API DisconnectAddon

From Vendetta Lua
Jump to navigationJump to search

DisconnectAddon

Definition:
DisconnectAddon(int itemid, function cb(int errorid)) -> bool ret1
Description:
detaches the addon itemid and stores it in the station
Note: detached items will likely have a different itemid in the station
Arguments:
itemid id of the item to detach
cb function to call on completion (optional)
errorid int corresponding to error, is nil if operation is successful
Returns:
ret1 returns true if the player is docked and has an active ship otherwise nil
Example:
<source lang="lua">DisconnectAddon(123) -> true</source> remove the item 123 from the active ship while the player is docked to a station