API GetInventoryItemLocation

From Vendetta Lua
Jump to navigationJump to search

GetInventoryItemLocation

Definition: GetInventoryItemLocation(int itemid) -> int stationid
Description:
get location of an inventory item
Arguments:
itemid itemid of an inventory item
Returns:
stationid stationid or nil if itemid is invalid
Example:
<source lang="lua">ShortLocationStr(SplitStationID(GetInventoryItemLocation(1234))) -> "Dau L-10"</source>
get the stationid of the item 1234
get the sectorid part of that stationid
print out the sectors name