Difference between revisions of "LlDetermineType"

From Second Life Wiki
Jump to navigation Jump to search
Line 43: Line 43:
|related
|related


|notes=Should make it easier for scripters to determine the types of parts of strings in order to get accurate results as opposed to manually deriving them from the string.
|notes=Should make it easier for scripters to determine the types of parts of strings in order to get accurate results as opposed to manually deriving them from the string. Could anyone delete the unnecessary parts to this page? This is my first time editing and I can't find it :P


|cat1
|cat1
|cat2
|cat2
}}
}}

Revision as of 20:21, 4 May 2009

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: integer llDetermineType( string source, integer start, integer end );

Returns an integer to represent the type of the part of the string.

• string source The string that you are determining the type of a part of.
• integer start The start point in the string of what you are determining.
• integer end The end point in the string of what you are determining.

number does not support negative indexes.

Caveats

  • If number is out of bounds the script continues to execute without an error message.

Examples

<lsl> default {

   state_entry()
   {
       llListen(0,"",llGetOwner(),"");
   }
   listen(integer chan, string name, key id, string msg)
   {
       if(llDetermineType(msg,0,-1)==1)
       {
           integer new_number=msg;
           vector also = <new_number,new_number*8,new_number/3>;
           llOwnerSay("The number you just said was "+(string)new_number+" and put in a vector, it is "+also+".");
       }
   }    

}

</lsl>

Notes

Should make it easier for scripters to determine the types of parts of strings in order to get accurate results as opposed to manually deriving them from the string. Could anyone delete the unnecessary parts to this page? This is my first time editing and I can't find it :P

Deep Notes

Signature

//function integer llDetermineType( string source, integer start, integer end );