OsIsUUID

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Added note stating which version of OpenSim introduced this function)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
|function_syntax=LSLInteger osIsUUID(String thing)
+
|function_syntax=LSLInteger osIsUUID(string thing)
 
|threat_level=ignored
 
|threat_level=ignored
 
|permissions=true
 
|permissions=true
Line 10: Line 10:
 
     state_entry()
 
     state_entry()
 
     {
 
     {
         key good_key = "09090909-1111-2222-3213-874598734592";
+
         string good_key = "09090909-1111-2222-3213-874598734592";
         key bad_key =  "8e9a6ed1-e2f4-4735-8132-e027bbcd27g1";
+
         string bad_key =  "8e9a6ed1-e2f4-4735-8132-e027bbcd27g1";
 +
        key bad_key2 =  "8e9a6ed1-e2f4-4735-8132-e027bbcd27g1";
 +
 
 +
 
 
          
 
          
 
         llOwnerSay((string)osIsUUID(good_key));
 
         llOwnerSay((string)osIsUUID(good_key));
 
         llOwnerSay((string)osIsUUID(bad_key));
 
         llOwnerSay((string)osIsUUID(bad_key));
     }
+
        llOwnerSay((string)osIsUUID((string)bad_key2));
}
+
 
 +
     }}
 
</source>
 
</source>
 
|additional_info=This function was added in 0.7.4-post-fixes
 
|additional_info=This function was added in 0.7.4-post-fixes
 
}}
 
}}

Revision as of 12:12, 14 November 2018

LSLInteger osIsUUID(string thing)
Returns 1 if the supplied string is a valid UUID, returns 0 otherwise.
Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Delay 0 seconds
Example(s)
default
{
    state_entry()
    {
        string good_key = "09090909-1111-2222-3213-874598734592";
        string bad_key =  "8e9a6ed1-e2f4-4735-8132-e027bbcd27g1";
        key bad_key2 =  "8e9a6ed1-e2f4-4735-8132-e027bbcd27g1";
 
 
 
        llOwnerSay((string)osIsUUID(good_key));
        llOwnerSay((string)osIsUUID(bad_key));
        llOwnerSay((string)osIsUUID((string)bad_key2));
 
    }}
Notes
This function was added in 0.7.4-post-fixes


Personal tools
General
About This Wiki