Jump to content

llGiveInventory help


Riley Matova
 Share

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

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

Recommended Posts

Hello everyone, I am trying to write a script that will give an object to someone that is 30 days or younger. I was able to get the script to detect the age, when I click the prim, it says that I am too old to get the gift, when a friend who is younger then 30 days clicks it, it says here is your free gift, however, the llGiveInventory isn't working, the item isn't getting delivered, any ideas as to why? Any help would be appreciated.

 

Thanks in advance.

 

Link to comment
Share on other sites

Hi, we could not guess why the script does not work without seeing it. Are the permissions OK on the object you want to give, and there are no error icons floating over the object?

It is good to know that on some of the viewers that new users will probably have, inventory accept is automatic. They should check their notification popup things or recent inventory, there may not be an accept dialog.

Link to comment
Share on other sites

If your code is sending the correct message when your friend clicks on it, then you can be fairly sure that her age is being calculated correctly, so the problem is likely to be in the information passed to llGiveInventory.

The problem is often that an improper UUID has been passed to the llGiveInventory function.  This can happen, for instance, if you have failed to capture the target av's UUID in a touch_start or collision_start event and pass it to whatever event the llGiveInventory function is sitting in.  One way to track it down is to put llOwnerSay diagnostic statements around the section of the code where you are trying to give inventory and find out what UUID and av name are being used.

Check also to be sure that the inventory you are trying to give isn't no copy, and that you have named it appropriately.

 

Link to comment
Share on other sites

Thanks for the input, I put the llOwnerSay in, and its returning  the key as all 0's, I have an if statement in my Dataserver event, and I think that is where it is failing, I try to set up my llDetectedKey in say a touch_start event, but, I keep in getting an error that the name is not defined within scope, so somehow it has to find the key in the Dataserver event?

Link to comment
Share on other sites

Define a global variable to carry the value of llDetectedKey(0) to the dataserver event. At the top of your script, before the default event, write, for example

key gAV;

Then, in the touch_start event, write

gAV = llDetectedKey(0);

Once gAV is defined and properly loaded that way, you can use it in the dataserver event in place of llDetectedKey(0), which will not work there. The llDetected* functions only work in events that actually detect something.

Link to comment
Share on other sites

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