Jump to content

Convert llRequestAgentData(id, DATA_BORN) to MM/DD/YYYY format


Leo1452
 Share

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

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

Recommended Posts

The wiki for this function says that this statement would return "The account creation/"born on" date as a string in an ISO 8601 format of YYYY-MM-DD," but I'm getting a string that looks like a UUID. Can someone help me with a solution to getting an agent's birth date from DATA_BORN?

Link to comment
Share on other sites

Read the wiki carefully.  The function llRequestAgentData returns a key and triggers the dataserver event, which then receives and processes the request to generate the string that you were expecting.

To make Wulfie's good example even more explicit, here's a more complete example:

key kRequest;

default
{
    state_entry()
    {
        kRequest = llRequestAgentData(llGetOwner(), DATA_BORN);  // The key is used to distinguish the result of this particular action
//               from other requests that may be made elsewhere in the same script
    }

    dataserver(key queryid, string data)
    {
        if (kRequest == queryid)  // When you have multiple requests, always be sure to verify which one you want to examine here
        {
            llOwnerSay(data); // Object: 2009-12-18
        }
    }
}

 

 

Edited by Rolig Loon
Cleaner wording
  • Like 1
Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...