Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGiveInventory create duplicates when passing notecards?

Greg Hauptmann
Registered User
Join date: 30 Oct 2005
Posts: 283
05-06-2006 23:09
Hi,

I'm noting when using llGiveInventory to update a notecard in a remote object it creates a duplicate with a "_1" at the end. Is this expected? Especially noting the wiki entry:

"If the recipient is an object, and the object already has something in its inventory with this name, it does not get the new item. This differs from what happens if a user manually places an item with a duplicate name into an object's inventory."

Whats the best way to work around this but based on a generic solution with the requirement that one would still want to be able to drop ScriptA into the target object multiple times and have in this cases duplicates created (e.g. for creating mulitple mail senders). I'm guessing the answer is:

--script in target objects: e.g. duplicate preventer---
- on_change: i.e. look for inventory change
- cycle through all NOTECARDS
- remove duplicates based on names

Is there a better solution though? One in which a duplication preventer script is not required to be dropped into target objects? Really want another option on llGiveInventory to ask whether it should be an update or not.

Tks







Regards
Greg
Greg Hauptmann
Registered User
Join date: 30 Oct 2005
Posts: 283
SL inventory system has a flag for each inventory item which indicates how arrived?
05-06-2006 23:26
actually it seems like the SL inventory system has a flag for each inventory item which indicates how the item got put in the inventory (e.g. manually, via llGiveInventory etc) as
  1. it seems like the duplication issue only arises when I'm trying ot use llGiveInventory to update a notecard which was placed in the object manually
  2. after it creates the first duplicate *_1 after this no more duplicates are created
  3. I've deleted the notecards and trying from the start and no duplicates occured - i.e. the first notecard into the target object was from the llGiveInventory approach, not a manual one
This would have to be a bug no?
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
05-07-2006 00:06
From: Greg Hauptmann
This would have to be a bug no?



Probably. It's intentional that scripts behave differently based on how they are put in an object, but I doubt it is for notecards.
Greg Hauptmann
Registered User
Join date: 30 Oct 2005
Posts: 283
05-07-2006 01:20
From: Nepenthes Ixchel
Probably. It's intentional that scripts behave differently based on how they are put in an object, but I doubt it is for notecards.
are you referring to the start parameters Nepenthes? What did you mean? (just wondering if there's a hole in my knowledge of scripting here)