Chris8888 Posted May 4, 2016 Share Posted May 4, 2016 I put on the market place an Object1 (container) that contains another Object2 (content).I set the permisions as follows:Object1: Next Owner - No Modify, Copy, No Resell/Give awayObject2: No Modify, Copy, TransferThe customer ended up with the following:Object1: No Modify, Copy, No TransferObject2: No Modify, Copy, TransferI think those were the right permisions in order to be able to pass copies of Object2 to the owner.However, the following line fails:if (llGetInventoryPermMask("Object2", MASK_OWNER) & PERM_COPY) llGiveInventoryList(llGetOwner(), "MyFolder", ["Object2"]);Any ideas why?*****Note: I isolated the code below and used the same permissions and pass it to a friend and works.Why not through the marketplace?default{ touch_start(integer total_number) { llSay(0, "Touched."); if (llGetInventoryPermMask("Object2", MASK_OWNER) & PERM_COPY) llGiveInventoryList(llGetOwner(), "MyFolder", ["Object2"]); }} Link to comment Share on other sites More sharing options...
Chris8888 Posted May 5, 2016 Author Share Posted May 5, 2016 I did more testing on the above. It looks that when the content of your object ends ups in the customer with No Motify, Copy, Transfer, then the content is not recognized (even though it is there with No Modify), ie. llGetInventoryKey(HookFrontName)=NULL_KEY Am I expected to pass the contend with modify permission when ideally it should be no modify and no transfer at the hands of the customer? This can't be right! Link to comment Share on other sites More sharing options...
Chris8888 Posted May 5, 2016 Author Share Posted May 5, 2016 Finally found the error with the help of Rolig Loon. Thank Rolig! I ddid not have time to sanidize the code, but the following is what I was using to prove the concept as a part of a bigger project. //Make an object (container) and add in the content 2 objects the the names "Chris'Hook1" and "Chris'Hook2"//whem you click on the object (container) the 2 objects should be copied to the inventory under a folder with the name "Chris'Hook1" key OwnerKey;key WhoClickedKey;string HookBackName="Chris'Hook1";string HookFrontName="Chris'Hook2"; GivenTheHooks(){//Hooks not attached on the avatar. Offer the Item from the container. //Before offering it, check if item exist in the containerllOwnerSay("2 HookFrontName=" + (string)llGetInventoryKey(HookFrontName));llOwnerSay("2 HookBackName=" + (string)llGetInventoryKey(HookBackName)); //THIS DOES NOT WORK --> if((llGetInventoryKey(HookFrontName)!=NULL_KEY) && (llGetInventoryKey(HookBackName)!=NULL_KEY))//BUT THE FOLLOWING DOESif((llGetInventoryType(HookFrontName)!= INVENTORY_NONE) && (llGetInventoryType(HookBackName)!=INVENTORY_NONE)){ //Check if the permisions are correct if ((llGetInventoryPermMask(HookFrontName, MASK_OWNER) & PERM_COPY) && (llGetInventoryPermMask(HookBackName, MASK_OWNER) & PERM_COPY)){//Do the offer. The item will be offered in a folderllGiveInventoryList(OwnerKey, Chris'Hook1, [HookFrontName, HookBackName]);}else{llInstantMessage(WhoClickedKey, "1 Something went wrong. The hooks do not have the right permissions to copy.");return;}}else{llInstantMessage(WhoClickedKey, "2 Something went wrong. The hooks are missing.");return;}} default{touch_start(integer total_number){OwnerKey=llGetOwner();WhoClickedKey=llDetectedKey(0);llOwnerSay("1 HookFrontName=" + (string)llGetInventoryKey(HookFrontName));llOwnerSay("1 HookBackName=" + (string)llGetInventoryKey(HookBackName)); GivenTheHooks();}} Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now