Talk:LlGetOwner

From Second Life Wiki
Revision as of 13:46, 5 December 2015 by Strife Onizuka (talk | contribs) (→‎llGetOwner() may not return a value?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Perhaps we should explain how to choose by owner ... either in this article or linked nearby ...

For example, to choose between 0 and 99 inclusive, making the same choice for the same owner every time while yet likely making a different choice for any few owners, is:

integer byOwner(integer beyond)
{
    string nybbles = llMD5String(llGetOwner(), 0);    
    string literal = "0x" + llGetSubString(nybbles, -8, -1);
    integer choice = (integer) literal;
    return (choice % beyond);
}

default
{
    state_entry()
    {
        llOwnerSay((string) byOwner(100));
    }
}

See also: 32bit_Hash

llGetOwner() may not return a value?

I just noticed the following listed caveat:

  • When the owner is offline the region can lose the owner uuid and return NULL_KEY or (Loading)... in some rare cases.

I've never encountered this, and it seems highly unlikely as the key is fixed and should be part of the prim/linkset so shouldn't need to be loaded by the region or have anything to do with the owner being online. The behaviour described can happen with names certainly, but I'm not convinced that this issue really occurs when retrieving the owner's key, can someone please confirm? --
-- Haravikk (talk|contribs) 11:10, 3 December 2015 (PST)

I apparently missed that edit. I cannot imagine it being true. Lets move it here for discussion. -- Strife (talk|contribs) 13:46, 5 December 2015 (PST)