Jump to content
  • 0

llGiveInventory(object, key) fails even if full permission is set on object. llKey2Name(key) works


Krillion Hax
 Share

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

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

Question

llGiveInventory(string object, key id); fails

I know this was working. I tried it with several clients and on several sims.

The item in inventory is named "Boxed Set" and has been tried with permissions T, M/T, C/M/T.

All fail to transfer to the receiver

For the final it requires only next owner may transfer be set causing the item to be removed upon sending.

This happens with

       string box_set = "Boxed Set"; // current item in prim inventory

       key namek; // this is input via listen()

       .code, code, code

        llGiveInventory(box_set,namek);
        llInstantMessage(llGetCreator(),"Sending a boxed set to: "+box_set+"\n"+   // box_set == the inventory contents
                                llKey2Name(namek)+"\n"+           // llKey2Name(namek) matches the AV key so the key is valid
                                (string)namek);                               // displays the actual key properly.

        llRemoveInventory(box_set);                                // removes the correct content from the prim inventory.

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

As Innula shows the order of the parameters is destination (key) then inventory (string).  You are rather unlucky that a key can be treated as a string so the compiler didn't notice they were the wrong way around when you saved the script.

The best place for scripting questions is the scripting tips forum: http://community.secondlife.com/t5/LSL-Scripting/bd-p/LSLScripting as discussion is encouraged there, only straightforward answers here.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4404 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...