API DisconnectAddon

From Vendetta Lua
Revision as of 21:57, 24 January 2016 by Chocolateer (Talk | contribs) (second argument is cb function)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, 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:

DisconnectAddon(123) -> true

remove the item 123 from the active ship while the player is docked to a station