llGetInventoryKey() gives NULL_KEY for objects
needs info
Artesia Heartsong
Unlike described on the wiki, which defines it as a pseudo UUID for objects.
Related: why isn't it possible to give the real asset UUID of scripts and objects? Any functional reason why it's pseudo?
Log In
Maestro Linden
marked this post as
needs info
Hi Artesia, I'm not able to reproduce this with Second Life Release 7.2.2.18475198968 on Second Life Server 2025-09-16.17777995432. Here's what I tried:
- Rez 2 boxes, named 'brand new box' and 'llGetInventoryKey test'
- Take 'brand new box' into agent inventory
- Drag a copy of 'brand new box' from agent inventory into 'llGetInventoryKey test'
- Create this script in 'llGetInventoryKey test'
default
{
touch_start(integer total_number)
{
string name = llGetInventoryName(INVENTORY_OBJECT, 0);
llSay(0, "The first object in prim inventory is named '" + name
+ "', and llGetInventoryKey() returns " + (string)llGetInventoryKey(name) + " for it.");
}
}
- Touch 'llGetInventoryKey test' a few times and note the output
In my testing, the output is consistent and not NULL_KEY:
[08:12] llGetInventoryKey test: The first object in prim inventory is named 'brand new box', and llGetInventoryKey() returns 16d332f1-0a74-5a67-cf08-0c706c465a24 for it.
[08:12] llGetInventoryKey test: The first object in prim inventory is named 'brand new box', and llGetInventoryKey() returns 16d332f1-0a74-5a67-cf08-0c706c465a24 for it.
The same UUID is output. by the script if I take 'llGetInventoryKey test' into inventory and rez it in a different region.
Are you seeing different results when you try the same steps? If there's a different set of steps that results in a NULL_KEY result, please share them.
Maestro Linden
Another question - is the object you're querying fully permissive? Per the wiki, if you don't have copy/mod/trans permissions, NULL_KEY is expected:
If name is not copy, mod, trans then the return is NULL_KEY.