API GetInventoryItemLocation

From Vendetta Lua
Jump to: navigation, 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:

ShortLocationStr(SplitStationID(GetInventoryItemLocation(1234))) -> "Dau L-10"

get the stationid of the item 1234
get the sectorid part of that stationid
print out the sectors name