Don't click here unless you want to be banned.

LSL Wiki : llGetInventoryKey

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl427.us.archive.org
key llGetInventoryKey(string name)

Returns the key of the inventory item name, or NULL_KEY if name not in object's inventory, or if the object owner does not have modify, copy and transfer permissions on that inventory item.

NOTE: If you intend to use llRezObject and/or llRezAtRoot with the inventory object, be aware that the key returned, is the key of the item within the inventory. Using llRezObject and/or llRezAtRoot, if the inventory object has copy permission, will result in a new copy of the inventory item being rezzed, with a new key issued to the new item. However, if the inventory item doesn't have copy permission, the original will be rezzed and the key will be unchanged. - DavidSoon

This can't be stressed enough: if the object owner does not have modify, copy and transfer permissions on the inventory item being requested, then the function returns the NULL_KEY. Everything else may have partial permissions, including the object and the script, and the function will work but the inventory item being requested MUST have full permissions. Do not attempt to use llGetInventoryKey to verify the existence of an inventory item. For that (and for checking its type), you want llGetInventoryType.

Compare with llGetInventoryName and llGetInventoryNumber.

NOTE:This function does not work on object as of server version 1.25." - CryogenicBlitz


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Inventory
Comments [Hide comments/form]
A: Items in the inventory of objects cannot have duplicate names. If you rename/drop an item with the same name as another in an object inventory, it will have a " #" (space number) suffixed, starting from 1 and going up. That is, if you have a cube with the notecard "hi there" in it, and you drop a second item with the same name in, it will then be "hi there 1". Dropping another will result in "hi there 2" and so forth.
-- StickMan (2007-06-26 23:48:33)
Attach a comment to this page: