API DisconnectAddon: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
split
 
second argument is cb function
 
Line 1: Line 1:
=== DisconnectAddon ===
=== DisconnectAddon ===
'''Definition:'''<br>
'''Definition:'''<br>
DisconnectAddon(int ''itemid'') -> bool ret1
DisconnectAddon(int ''itemid'', function ''cb''(int ''errorid)) -> bool ret1
<br>
<br>
'''Description:'''<br>
'''Description:'''<br>
Line 8: Line 8:
<br>
<br>
'''Arguments:'''<br>
'''Arguments:'''<br>
''itemid'' id of the item to detach  
''itemid'' id of the item to detach<br>
''cb'' function to call on completion (optional)<br>
''errorid'' int corresponding to error, is nil if operation is successful
<br>
<br>
'''Returns:'''<br>
'''Returns:'''<br>

Latest revision as of 21:57, 24 January 2016

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