Object Giver - what am i doing wrong?
|
|
Carmsie Melodie
Chill Dezigns Art
Join date: 14 May 2009
Posts: 47
|
12-06-2009 00:54
Hi there, I have a new sim called Daydream Island and it has a swimming area. As a gift I am trying to give a freebie bikini to girls and shorts to guys. I have set up freebie boxes and in each I have a LM and a LM Giver. These work fine. When each box is clicked the LM is given. However I cant get the Object Giver to work. The clothes are full perm (have checked) and I have tried 2 different object giver scripts but they both come up with the same error message, as follows: Object: Unable to give inventory: 'No item named ''.'. I have used these scripts before without a problem. Is it a sim permission thing, maybe? Or the naming convention of the clothes is wrong? Am I supposed to type the object name in the script somewhere? Any help you can give would be much appreciated. I am baffled. Thamls 
|
|
Ponsonby Low
Unregistered User
Join date: 21 May 2008
Posts: 1,893
|
12-06-2009 00:56
From: Carmsie Melodie Hi there, I have a new sim called Daydream Island and it has a swimming area. As a gift I am trying to give a freebie bikini to girls and shorts to guys. I have set up freebie boxes and in each I have a LM and a LM Giver. These work fine. When each box is clicked the LM is given. However I cant get the Object Giver to work. The clothes are full perm (have checked) and I have tried 2 different object giver scripts but they both come up with the same error message, as follows: Object: Unable to give inventory: 'No item named ''.'. I have used these scripts before without a problem. Is it a sim permission thing, maybe? Or the naming convention of the clothes is wrong? Am I supposed to type the object name in the script somewhere? Any help you can give would be much appreciated. I am baffled. Thamls  Look in the script for double quotes: "" Anywhere you see those, type or paste in the object name (exactly--same spacing, capitalization, etc.) That might take care of it. (Some scripts are designed to give anything that's in the inventory of that object, while others require that the name of the thing-to-be-given be typed into the script.)
_____________________
War is over---if you want it. P Low Low P Studio SMALL PARCEL SOLUTIONS: Homes & shops of distinction, with low prim-counts, surprisingly low prices! 
|
|
Ralektra Breda
Template Painter
Join date: 7 Apr 2008
Posts: 1,875
|
12-06-2009 01:50
It might be easier to rezz a prim, put the swimsuit inside, and set the prim to sell contents for $0L.
_____________________
 Mainstore: http://slurl.com/secondlife/Phantasm/51/164/501 http://rbzdesign.blogspot.com/ I'm not a designer IRL, but I RP one on SL!
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
12-06-2009 03:23
You can also change the "When Left-Clicked" action to "Buy object" to make it a little easier for them to get the contents. (That's set at the bottom of the General tab when you Edit the object.) What's nice about this buying contents approach is that it puts the stuff all in a top-level Inventory folder, named for the object itself. If it's a concern that visitors will be suspicious of having to "buy" a freebie, here's a dopey little script I just hacked up that does more or less the same thing with the top-level folder, giving everything contained in the object except the script itself: default { touch_start(integer total_number) { list invList; string scriptName = llGetScriptName(); integer invIndex = llGetInventoryNumber(INVENTORY_ALL) - 1; for(; invIndex >= 0; invIndex--) { string invName = llGetInventoryName(INVENTORY_ALL, invIndex); if (scriptName != invName) invList += invName; } llGiveInventoryList(llDetectedKey(0), llGetObjectName(), invList); } }
(Yes, scripts display unindented here; if you pretend to Quote this post, you can get the properly formatted version.)
|
|
Ciaran Laval
Mostly Harmless
Join date: 11 Mar 2007
Posts: 7,951
|
12-06-2009 06:01
Are the items boxed or have you just put the clothing in there as clothing? The LSLwiki has a simple example of how an object giver should work: default { touch_start(integer total_number) { // to give a different inventory item type, // replace "INVENTORY_OBJECT" with "INVENTORY_NOTECARD", etc. llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_OBJECT, 0)); } } http://lslwiki.net/lslwiki/wakka.php?wakka=llGiveInventory
|
|
Carmsie Melodie
Chill Dezigns Art
Join date: 14 May 2009
Posts: 47
|
Very helpful!
12-06-2009 12:06
Thanks so much for your help. Learned something from each reply  ... am off to try different things to see what works best. You guys rock!
|
|
Ponsonby Low
Unregistered User
Join date: 21 May 2008
Posts: 1,893
|
12-06-2009 12:12
From: Qie Niangao ...if you pretend to Quote this post, you can get the properly formatted version. I never knew that; thanks for that information, as well as for the script, which I plan to use!
_____________________
War is over---if you want it. P Low Low P Studio SMALL PARCEL SOLUTIONS: Homes & shops of distinction, with low prim-counts, surprisingly low prices! 
|
|
Melita Magic
On my own terms.
Join date: 5 Jun 2008
Posts: 2,253
|
12-06-2009 15:37
Use a give all (to anyone) script. It will give everything in there. That's the easy way.
|