Jump to content

llGiveInventoryList - Debug Chatter


Xeph Brunsen
 Share

You are about to reply to a thread that has been inactive for 1949 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

May be wishful thinking here ...

But does anyone have any idea or advice on how to bypass the debug error that is sent when no inventory of the matching flag is found. Function is used in a larger script to remotely transfer animations to a link in a linkset then transfer notecards in a seperate but similar function. My initial drafting failed upon any missing inventory ie: no notecards or no animations. This version does not stall and keeps on trucking to the next function. However, if that debug message is around to stay ... I may have to rethink the entire design as having errors present in any product may freak out the masses. At this stage all attempts to combine two different flags ie: Animations & Notecards have failed.

Unfortunately I'm going down paths never taken before with llGiveInventory and using it in a remote installation system and seeing alot of this for the first time.

 

list    InventoryList;
        integer count = llGetInventoryNumber(INVENTORY_ANIMATION); 
        string  ItemName;
        while (count--)
        {
            ItemName = llGetInventoryName(INVENTORY_ANIMATION, count);
            if (ItemName != llGetScriptName() )  
                InventoryList += ItemName;  
        }
       
        llGiveInventoryList(message, llGetObjectName(), InventoryList);

Link to comment
Share on other sites

"Unable to give inventory list: No items passed filter"

I'm guessing because no items were in the contents, this is the general debug or script error. It does continue however and does not stall the script. Somehow I need to be able to prepare for the inevitable fact that the system may be used to only remote load some animations or notecards and not both as designed.

If things are backwards they came as such off of a wiki unfortunately. Normally, I'll pull the wiki, learn the functions ... re-write and modify as needed or develop upon them as needed. It's a great source of information for functions that you normally wouldn't touch or attempt lol.

Edited by Xeph Brunsen
Link to comment
Share on other sites

Did that as well. Only passes the error when the inventory type is not found.

Ie:

If both NC's and Animations are in the prims contents then it remotely transfers them and no error registered.

If Only animations are present and no notecard then when it reaches the llgiveinventorylist section for notecards the error registers at that point and vice versa for Notecards and no animations.

My Guess it's a hard coded error that triggers because of the missing inventory type but does not stop the script. May not be able to script around it to avoid the error but am certainly curious if its possible.

Edited by Xeph Brunsen
Link to comment
Share on other sites

3 minutes ago, Xeph Brunsen said:

Did that as well. Only passes the error when the inventory type is not found.

Ie:

If both NC's and Animations are in the prims contents then it remotely transfers them and no error registered.

If Only animations are present and no notecard then when it reaches the llgiveinventorylist section for notecards the error registers at that point and vice versa for Notecards and no animations.

My Guess it's a hard coded error that triggers because of the missing inventory type but does not stop the script.

AH, there must be a test line which when one or both is missing then script throws up an error.

  • Thanks 1
Link to comment
Share on other sites

47 minutes ago, Xeph Brunsen said:

"Unable to give inventory list: No items passed filter"

This is caused by this section of your script:

    // ...
    if (ItemName != llGetScriptName())
        InventoryList += ItemName;  
}

llGiveInventoryList(message, llGetObjectName(), InventoryList);

After your loop has finished, you send InventoryList without checking if anything was added to it. You must check that the length of InventoryList is greater than 0.

    // ...
    if (ItemName != llGetScriptName())
        InventoryList += ItemName;  
}

if(llGetListLength(InventoryList) > 0)
    llGiveInventoryList(message, llGetObjectName(), InventoryList);

I would also generally advice you to be wary of leaving out the brackets after an If-check, it could easily lead into mistakes. Personally, if I leave out the brackets, I keep the following statement on the same line as the If-check itself.

Edited by Wulfie Reanimator
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Xeph Brunsen said:

Unable to give inventory list: No items passed filter

I may be mistaken but I think that error means there are no items on the list that copyable by the object's owner.    What are the next-owner perms on the animations when you send them out?   That's generally why unpackers fail -- if A gives B a box containing items copyable by A but not B, then llGiveInventoryList won't work when B tries to unpack it, though the identical script and items will work if A owns the box.

I'm not completely sure what this means

2 hours ago, Xeph Brunsen said:

Function is used in a larger script to remotely transfer animations to a link in a linkset

but it sounds as if you're making an updater that is sent out to a customer, who then rezzes it on the ground so it can give the animations to the item that needs updating.  If that's the case, the animations have to be copyable by the next owner when you send it out.

  • Thanks 1
Link to comment
Share on other sites

It is Indeed a Updater that handles remotely loading animations and/or notecards to a child prim instead of the Root. All test items were full perm, owned by me and transferred to me. Other variations include different inventory types that the Product uses. Sort of a hands free experience to prevent unneeded accessing of the child prims.

Wulfie helped get some logic corrected ... After some additional testing and scripting I'm going to admit that alot of the issue was "KISS". Keep It Simple Stupid ... Basically I was failing to close an argument properly and once it got to sending the inventory over it didn't know what to do if there wasn't a certain type to send over. IE: No Notecard or No Animation. Once it hit that point the script simply stopped progressing as I had not defined it properly.

The second Iteration as I was seeking guidance on here would send the items no matter what but if one or the other type of inventory was missing it would give the script error but keep progressing till the end of the script.

This is honestly where I must Say Thank you to everyone that has and does assist with guidance as sometimes with New Functions, Things may not be fully understood or simple syntax errors cause unexpected failures. There is and will always be someone more experienced than myself that graciously helps and points us in the right direction.

It's a whole lot of Trial and Error. Especially since I have never scripted an updater before and RemoteLoadScriptPin and GiveInventory are unknown territory.

 

Once things have been finalized and released I will tweak some information and post a copy in the library. I was just unable to post the script in it's entirety as some of the information contained within would release sensitive product information.

 

 

Edited by Xeph Brunsen
Link to comment
Share on other sites

On 12/22/2018 at 12:25 PM, steph Arnott said:

Well you certainly need to trim the information before adding it to a list and sort the list after.

Thanks Steph, Things have been edited and appear to be working normally. Still debugging some things over time.

 

Edited by Xeph Brunsen
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1949 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...