UpdateDetails()
{
obj_name = llGetInventoryName(INVENTORY_OBJECT, obj_number);
obj_creator = llGetInventoryCreator(obj_name);
}
I couldn't seem to retrieve the object creator's key, it keeps throwing me a null key. Is the function disabled?
These forums are CLOSED. Please visit the new forums HERE
Help! llGetInventoryCreator() Disabled? |
|
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 16:40
UpdateDetails()
{ obj_name = llGetInventoryName(INVENTORY_OBJECT, obj_number); obj_creator = llGetInventoryCreator(obj_name); } I couldn't seem to retrieve the object creator's key, it keeps throwing me a null key. Is the function disabled? |
|
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
|
05-24-2008 17:00
The function is not disabled, I'm fairly sure of that. Have you double-checked the value of obj_name to sanity-check the fact that it matches the name of the object in inventory?
. _____________________
|
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 17:04
I don't think there should be any errors in the object name when it's directly retrieved using this following clause:
obj_name = llGetInventoryName(INVENTORY_OBJECT, obj_number); Unless, there's a prerequisite data format i need to change it to. Otherwise, it's still string. The fact that it did not give me a script error saying it could not find the said object, makes me double confirm it found the object in the prim, just not able to retrieve the creator key D: |
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
05-24-2008 17:14
my first instinct is to make sure you're calling the right numbers.
If you have 10 textures in an object, they will be inventory numbers 0-9. If you call #10, you'll get a weird Null-Key response. that's 0.. through (llGetInventoryNumber(BLAH_BLAH) - 1) _____________________
![]() ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura |
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 17:27
Let's just take the obj_number as 0.
Tried it, and it's still giving a null key >.< |
|
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
|
05-24-2008 17:36
I don't think there should be any errors in the object name when it's directly retrieved using this For all I know, you are using INVENTORY_OBJECT as a parameter when you really mean INVENTORY_SCRIPT or something, so double-checking the returned value of obj_name to make sure it matches what you see when you look in the object's inventory might have some value, or it might just confirm what you already know. Another sanity check might be to simply temporarily hard-code the name of the inventory item you are interested in, just to make sure that even when you know with absolute certainty that the object name is correct that you are (or are not?) getting the inventory item's creator. I use llGetInventoryCreator( llGetScriptName() ) in many of my scripts, and it works flawlessly, so there's something else causing your problems. llGetInventoryCreator() is almost certainly not the culprit. . _____________________
|
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 17:55
Getting the name of the object has no problems. Infact i make it say out the object name and creator key to verify the variables. I've even tried hard coding the object name. Still, it throws me a null key, as in a whole bunch of Zeros.
![]() |
|
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
|
05-24-2008 18:43
Well, there must be something else going on... Perhaps if you post more of the script someone can see what that might be.
The following script works perfectly for me: CODE
I just threw that in an object that contained an object in it's inventory named 'My Test Inventory Object', and this is the output: CODE [18:42] llGetInventoryCreator Test: Inventory Object Name : My Test Inventory Object . _____________________
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-24-2008 19:08
Is it possible you have conflicting global and local names?
CODE
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey |
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 19:11
Here's what i did
![]() string obj_name; key obj_creator; integer obj_number; integer obj_total; CountItems() { obj_total = llGetInventoryNumber( INVENTORY_OBJECT ); --obj_total; } UpdateDetails() { obj_name = llGetInventoryName(INVENTORY_OBJECT, obj_number); obj_creator = llGetInventoryCreator(obj_name); } default { state_entry() { llSay(0, "RESET!" ;obj_number = 0; } touch_start(integer total_number) { CountItems(); UpdateDetails(); llSay(0,"[" + (string)obj_number + "/" + (string)obj_total + "] " + obj_name + " created by " + (string)obj_creator + "." ;} } |
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 19:13
I just tried your script and still the same result.
[19:12] Object: Inventory Object Name : harupa [19:12] Object: Inventory Creator Key : 00000000-0000-0000-0000-000000000000 Well, there must be something else going on... Perhaps if you post more of the script someone can see what that might be. The following script works perfectly for me: CODE
I just threw that in an object that contained an object in it's inventory named 'My Test Inventory Object', and this is the output: CODE [18:42] llGetInventoryCreator Test: Inventory Object Name : My Test Inventory Object . |
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-24-2008 19:16
I'm curious, where did you get "harupa"? Can you rez it?
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey |
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 19:18
Yes, i can rez it. It's from a sword from a friend.
I'm curious, where did you get "harupa"? Can you rez it? |
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-24-2008 19:32
When you look at the properties of the object in inventory, does it say a specific name as the creator or does it say "multiple" or "none" or something like that?
A memory just dislodged itself, something about either llGetCreator or llGetInventoryCreator and objects authored by multiple people. As in the function would return a null key. _____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey |
|
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
|
05-24-2008 19:59
Just wanna ask, perhaps this is too obvious, but...
You are trying to get the creator of an object inside of another object, right? . _____________________
|
|
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
|
05-24-2008 20:05
When you look at the properties of the object in inventory, does it say a specific name as the creator or does it say "multiple" or "none" or something like that? A memory just dislodged itself, something about either llGetCreator or llGetInventoryCreator and objects authored by multiple people. As in the function would return a null key. Gotta be something like that, I'm thinking, because in a new object with all inventory created by me, Phr0zen's script as given above works perfectly. And, that wouldn't surprise me, now that I think of it. I've seen instances of objects whose creator info doesn't list properly in properties not behaving as expected when attempting to query information via script. . _____________________
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-24-2008 20:09
I'm going to bet in the items property page it says the creator is "
no one)"It took a while to find a reference to what I was trying to remember: http://lslwiki.net/lslwiki/wakka.php?wakka=creator _____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey |
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 20:18
I'm going to bet in the items property page it says the creator is " no one)"It took a while to find a reference to what I was trying to remember: http://lslwiki.net/lslwiki/wakka.php?wakka=creator Item is created by Felucca Gustafson. The whole object was created by her. Just not the scripts in the object. |
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-24-2008 20:28
Item is created by Felucca Gustafson. The whole object was created by her. Just not the scripts in the object. It does make a sort of sense, your friend didn't create all of it, so why should she be listed as the creator? Doesn't help you though :-/ _____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey |
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 20:35
I'm trying to create a gallery that rezzes objects for display purposes, and to show the creator name of the object. Also trying to avoid using Notecards, since my previous gallery crashed at over 230 items.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-24-2008 21:08
After you rez the object does llGetObjectData return a useful value?
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey |
|
Phr0zen Katsu
Registered User
Join date: 24 Jun 2006
Posts: 39
|
05-24-2008 22:06
The thing is, if i can't even get the owner name, i can't proceed on with rez etc.
|