GenUUID
Function notes
See also: String
Return value notes
Returns a string that is a clone look of a uuid, these keys are not registered within SL.
Specification
string genUUID() {
string characters = "0123456789abcdefghijklmnopqrstuvwxyz";
float len = (float)llStringLength(characters);
string emp;
integer i = 32;
integer p;
do
emp += llGetSubString(characters, p = (integer)llFrand(len), p);
while(--i);
return llGetSubString(emp,0,7) + "-" + llGetSubString(emp,8,11)+ "-" + llGetSubString(emp,12,15)+ "-" + llGetSubString(emp,16,19)+ "-" + llGetSubString(emp,20,31);
}Examples
default
{
touch_start(integer total_number)
{
llSay(0, genUUID());
}
}
//Says something like 4kwlhahj-ilpw-df7v-wv8i-3i7m9gx6309Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.