Jump to content

will the last one in ... a notecard drop-box wrinkle


clarashymonkey
 Share

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

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

Recommended Posts

I think I already know that the answer to my question is no, but I thought i'd ask it anyway.

Briefly, I have scripted a little drop-box in which people can deposit notecards as a way of contacting a SIMs management and, as far as that goes, it does the job, filtering out deposits that are not notecards, informing its owners that a new card has been deposited and so on.

My question is: allowing for the likelihood that the drop-box may already contain several notecards whenever a new notecard is deposited, is there any way to identify that latest addition to the drop-box's inventory? 

Accessing each notecard's 'acquired' time-stamp would do it, but I can't find a way to do that.

Any thoughts? Suggestions? Have I missed something obvious?

Link to comment
Share on other sites

There's no built-in way to detect which item was added.

See this script, which is linked on this page: http://wiki.secondlife.com/wiki/WhoAddedWhat

Essentially, you'll have to maintain a list of every inventory item in the contents. When something new gets put into the inventory, you'll go through the whole inventory and check which item(s) aren't in your recorded list already. That's how you'll know they're the new items.

Edited by Wulfie Reanimator
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

By the way , there is certainly a bug inside llgetobjectdetails .

 

I explain : when you fetch your object nventory , you can get the keys of the different objects/notecards/items inside it .

But when you try to call llgetobjectdetails with a key of an item inside your object inventory  to get OBJECT_CREATION_TIME ( i quote this one because it s interresting for your case ) , the return of the function is empty .

In my point  of view , it s clearly a bug because the creation time is available and accessible in the viewer . For the viewer , an object doesn t need to be rezzed to return these informations inside the inventory object

( it s the same issue for other fields , as OBJECT_DESC , OBJECT_CREATOR and a lot of other fields )

 

If this function was not bugged , your question  would have a more simpler answer and you won t need to maintain an useless list

Edited by Miranda Umino
Link to comment
Share on other sites

That's not a bug. The caveats section on the wiki page for llGetObjectDetails explicitly states it does not return data about inventory items.

Quote

This function does not return information about items in inventory.

Edit: Not a bug, but perhaps a deficiency. It would definitely be useful for inventory operations to be able to get some info on inventory objects. Perhaps a suggestion to expand the function to cover inventory items or add a sister function like llGetInventoryObjectDetails which uses a relevant subset of flags. Since inventory items are wrappers, I wonder how much work it would take to add a new flag specifically for inventory items like INVENTORY_ADD_TIME... I might look into drafting up a feature request...

Edited by Fenix Eldritch
  • Like 2
Link to comment
Share on other sites

27 minutes ago, Fenix Eldritch said:

That's not a bug. The caveats section on the wiki page for llGetObjectDetails explicitly states it does not return data about inventory items.

Edit: Not a bug, but perhaps a deficiency. It would definitely be useful for inventory operations to be able to get some info on inventory objects. Perhaps a suggestion to expand the function to cover inventory items or add a sister function like llGetInventoryObjectDetails which uses a relevant subset of flags. Since inventory items are wrappers, I wonder how much work it would take to add a new flag specifically for inventory items like INVENTORY_ADD_TIME... I might look into drafting up a feature request...

lol .. a dficiency , in my point of view , is a bug .. 

 it s clearly a bug . ( even if it s a q a "quality " or a "design " bug and not a "coding" bug , it s a bug )

Explain why the viewer can  fetch some infos in the object inventory , and the scripts ( inside an object who fetches its own inventory , so who haves the authorisations/rights) can t 

I well bet it s Q.A bug because of course a script shouldn t fetch some inventories to other objects who can t be modified

Bad QA testing

Edited by Miranda Umino
Link to comment
Share on other sites

A function lacking some feature is not necessarily a bug. For example, llSetAnimationOverride does not include ability to override the typing state. I wouldn't call that a bug. The function is working as designed. That design can potentially be expanded or enhanced via feature requests, but not bug reports.

By a similar token, it could simply be that llGetObjectDetails was not originally designed to work with inventory items. Filing a bug report against that would likely result in it being closed with a "working as designed" reason. A feature request to expand that design would have a better chance at augmenting the function.

  • Like 2
Link to comment
Share on other sites

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