ChaosRaine Posted February 15, 2014 Share Posted February 15, 2014 I made a script that will open a box automatically when rezzed. It is only works if the person I give the box to has copy rights to the boxes inventory. I want to make thing mod and trans for the buyer, but they get the "No objects passed filter" error when they don't have copy rights. Any ideas as to why that would happen? Link to comment Share on other sites More sharing options...
ObviousAltIsObvious Posted February 15, 2014 Share Posted February 15, 2014 if the contents are no copy, llGiveInventoryList will fail with a message like that. you have to use llGiveinventory instead. 1 Link to comment Share on other sites More sharing options...
ChaosRaine Posted February 15, 2014 Author Share Posted February 15, 2014 Thank you for helping. So a line like llGiveInventoryList(inputKey, nameOfFolderToBeCreated, listOfItemsToSend); Would change to llGiveInventory(inputKey, nameOfFolderToBeCreated, listOfItemsToSend);? I can post my full script if that is easier Link to comment Share on other sites More sharing options...
ObviousAltIsObvious Posted February 15, 2014 Share Posted February 15, 2014 llGiveInventory can't make folders, you need to send the items one at at a time. the second example script on the llGiveinventoryList page shows one way to deal with this. https://wiki.secondlife.com/wiki/LlGiveInventoryList#Examples Link to comment Share on other sites More sharing options...
ChaosRaine Posted February 15, 2014 Author Share Posted February 15, 2014 Ok I think I can rig that in to work. A little late for me now I'll try it in the morning. Thanks again for your help Link to comment Share on other sites More sharing options...
ChaosRaine Posted February 16, 2014 Author Share Posted February 16, 2014 Yeah that's not quite what I need, I want it to give the entire inventory at once. I've bought stuff that will do similar things to this and I will get the warning sometimes "Can't copy inventory. Inventory moved" or something like that I forget the warning, but its basically telling you that the object's inventory is now in your inventory with no copys left in the object. I think that is more along the lines of what I want. Do you have any ideas? Link to comment Share on other sites More sharing options...
steph Arnott Posted February 16, 2014 Share Posted February 16, 2014 If you want to have the objects copied to your inventory, and remove the objects from the prim, then the sending scipt needs to delete what is in the senders contents, e.g. copy contents to owner, done that so delete everything I contain. llRemoveInventory http://wiki.secondlife.com/wiki/LlRemoveInventory Link to comment Share on other sites More sharing options...
ChaosRaine Posted February 16, 2014 Author Share Posted February 16, 2014 Don't they still need to have copy rights for that to work? It looks like its going to do the same thing that way. Just copy all the contents to the person's inventory then delete it. So, won't it still not work if the person I'm giving it to doesn't have copy rights? Link to comment Share on other sites More sharing options...
ObviousAltIsObvious Posted February 16, 2014 Share Posted February 16, 2014 ChaosRaine wrote: Yeah that's not quite what I need, I want it to give the entire inventory at once. I've bought stuff that will do similar things to this and I will get the warning sometimes "Can't copy inventory. Inventory moved" or something like that I forget the warning, but its basically telling you that the object's inventory is now in your inventory with no copys left in the object. I think that is more along the lines of what I want. Do you have any ideas? there is no LSL function that can create a folder and still work with no copy items. that example script from the wiki is the closest you can get, copiable ones can go to a folder but no copy ones go to generic destinations. Link to comment Share on other sites More sharing options...
steph Arnott Posted February 16, 2014 Share Posted February 16, 2014 Not sure were your info comes from, you can create a folder and put in no copy. by script Happens all the time in SL. @ ChaosRaine As for the script, that is what the employment forum is for. I do not write scripts here anymore. This forum is to workout scripts you have written, not to write them for you. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 16, 2014 Share Posted February 16, 2014 Hmmm.. Obvious is right on this one, Steph. If you use llGiveInventoryList, the items that you load into the list that it uses to generate a folder need to have copy perms. If you have no-copy items in the list, the transfer fails. See the caveats at http://wiki.secondlife.com/wiki/LlGiveInventoryList Link to comment Share on other sites More sharing options...
steph Arnott Posted February 16, 2014 Share Posted February 16, 2014 I confused on that as I get no copy items in a folder sent to me, please explain. Hmm, maybe I getting confused with opening the box and trans contents. Any way if Roligsay i wrong theni wrong. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 17, 2014 Share Posted February 17, 2014 Yes, YOU can put no-copy things in a folder yourself and hand it to me. That's no problem. It's just that a script can't do that with llGiveInventoryList. If you want a script to give no-copy items, it has to give them one at a time with llGiveInventory. Link to comment Share on other sites More sharing options...
ObviousAltIsObvious Posted February 17, 2014 Share Posted February 17, 2014 steph Arnott wrote: I confused on that as I get no copy items in a folder sent to me, please explain. Hmm, maybe I getting confused with opening the box and trans contents. Any way if Roligsay i wrong theni wrong. for a case like a vendor, where you (as the seller) have copy permission but the next owner will not, then llGiveinventoryList would work. for a case like the OP, where the box is already in the hands of the next owner and no copy is already active, it won't work. Link to comment Share on other sites More sharing options...
ChaosRaine Posted March 23, 2014 Author Share Posted March 23, 2014 Ok I finnaly have something that is working. It still gives the items one at a time, however the user only has to click the item once to get the whole inventory. I'm still haveing trouble getting to activate on attach rather then touch though. Here is what I have now. list give_in_folder;list give_individually;integer item_no;string name;string gUUID;integer folder_give = FALSE;integer item_give = FALSE;get_inv_details(){ name = llGetInventoryName( INVENTORY_ALL, item_no ); if ( name != llGetScriptName() ) { integer mask = llGetInventoryPermMask(name, MASK_OWNER); if ( (mask & PERM_COPY) ) { give_in_folder = give_in_folder + [ name ]; folder_give = TRUE; } else { give_individually = give_individually + [ name ]; item_give = TRUE; } }}init(){// Hovertext, edit accordingly - commented out right now,using separate script// llSetText( "abc\ndef",<1,1,1>,1); }default{state_entry(){ gUUID = llList2String(llGetObjectDetails(llGetKey(), ([OBJECT_DESC])), 0); init();}on_rez( integer param){ llSay(0, "Open Chat History (Ctrl+H) and click this link to join our group: secondlife:///app/group/"+gUUID+"/about"); init();} touch_start( integer num ){ item_no = 0; for ( item_no= 0 ; item_no < llGetInventoryNumber( INVENTORY_ALL ) ;item_no++ ) { get_inv_details(); } if ( folder_give ) { llGiveInventoryList ( llDetectedKey(0), llGetObjectName(), give_in_folder ); } if ( item_give ) { integer i; for ( i=0 ; i<llGetListLength( give_individually ) ; i++ ) { llGiveInventory( llDetectedKey(0),llList2String( give_individually, i )); } }}} I thought what I had to do is replace touch_start( integer num ) with attach(key id) , but that doesn't seem to be working. Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 24, 2014 Share Posted March 24, 2014 Two problems: First, an attach event is triggered whenever the scripted object is attached or detached, so you have to be sure to specify that you mean to give things only on attach. So attach(key id){ if (id) // That is, if id != NULL_KEY { //Give stuff }} Then, llDetectedKey() only works in a touch* or collision* event, so you can't use it in attach. Fortunately, though, you already know who you're giving stuff to >>> the the owner, otherwise known here as id. So llGiveInventoryList(id,llGetObjectName(),give_in_folder); Link to comment Share on other sites More sharing options...
Recommended Posts
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