Difference between revisions of "Template:LSL Function"

From Second Life Wiki
Jump to navigation Jump to search
Line 11: Line 11:
{| width="100%"
{| width="100%"
|-
|-
|valign="top"|
|
<div id="box">
{{{LslFunction
<div style="padding: 0.5em">
|{{{name}}}|{{{1}}}|{{{2}}}|{{{3}}}}}
{{{description}}}
|r={{{r}}}
</div>
{{ #if: {{{p1|}}} |p1t={{{p1t}}}|p1={{{p1}}}|p1d={{{p1d}}} }}
</div>
{{ #if: {{{p2|}}} |p2t={{{p2t}}}|p2={{{p2}}}|p2d={{{p2d}}} }}
|-
{{ #if: {{{p3|}}} |p3t={{{p3t}}}|p3={{{p3}}}|p3d={{{p3d}}} }}
|<div id="box">
{{ #if: {{{p4|}}} |p4t={{{p4t}}}|p4={{{p4}}}|p4d={{{p4d}}} }}
'''<div style="font-size:125%;">{{LSLType|{{{returnType}}}}} {{{name}}}({{ #if: {{{paramName1|}}} | {{LSLType|{{{paramType1}}}}} {{{paramName1}}} |}}{{ #if: {{{paramName2|}}} |, {{LSLType|{{{paramType2}}}}} {{{paramName2}}} |}}{{ #if: {{{paramName3|}}} |, {{LSLType|{{{paramType3}}}}} {{{paramName3}}} |}}{{ #if: {{{paramName4|}}} |, {{LSLType|{{{paramType4}}}}} {{{paramName4}}} |}}{{ #if: {{{paramName5|}}} |, {{LSLType|{{{paramType5}}}}} {{{paramName5}}} |}}{{ #if: {{{paramName6|}}} |, {{LSLType|{{{paramType6}}}}} {{{paramName6}}} |}}{{ #if: {{{paramName7|}}} |, {{LSLType|{{{paramType7}}}}} {{{paramName7}}} |}}
{{ #if: {{{p5|}}} |p5t={{{p5t}}}|p5={{{p5}}}|p5d={{{p5d}}} }}
{{ #if: {{{paramName8|}}} |, {{LSLType|{{{paramType8}}}}} {{{paramName8}}} }}{{ #if: {{{paramName9|}}} |, {{LSLType|{{{paramType9}}}}} {{{paramName9}}} |}});</div><div style="padding: 0.5em">'''{{LslFunctionStats|{{{functionID}}}|{{{sleep}}}|{{{energy}}}}}
{{ #if: {{{p6|}}} |p6t={{{p6t}}}|p6={{{p6}}}|p6d={{{p6d}}} }}
{{ #if: {{{paramName1|}}} | * {{{paramName1}}} - {{{paramDesc1}}}<br />|}}{{ #if: {{{paramName2|}}} | * {{{paramName2}}} - {{{paramDesc2}}}<br />|}}{{ #if: {{{paramName3|}}} | * {{{paramName3}}} - {{{paramDesc3}}}<br />|}}{{ #if: {{{paramName4|}}} | * {{{paramName4}}} - {{{paramDesc4}}}<br />|}}{{ #if: {{{paramName5|}}} | * {{{paramName5}}} - {{{paramDesc5}}}<br />|}}{{ #if: {{{paramName6|}}} | * {{{paramName6}}} - {{{paramDesc6}}}<br />|}}{{ #if: {{{paramName7|}}} | * {{{paramName7}}} - {{{paramDesc7}}}<br />|}}{{ #if: {{{paramName8|}}} | * {{{paramName8}}} - {{{paramDesc8}}}<br />|}}{{ #if: {{{paramName9|}}} | * {{{paramName9}}} - {{{paramDesc9}}}<br />|}}</div>
{{ #if: {{{p7|}}} |p7t={{{p7t}}}|p7={{{p7}}}|p7d={{{p7d}}} }}
</div>
{{ #if: {{{p8|}}} |p8t={{{p8t}}}|p8={{{p8}}}|p8d={{{p8d}}} }}
{{ #if: {{{p9|}}} |p9t={{{p9t}}}|p9={{{p9}}}|p9d={{{p9d}}} }}
|tb={{{tb}}}
}}}
|-
|-
|
|
<div id="box" style="clear:right;>
<div id="box">
 
== Specification ==
== Specification ==
<div style="padding: 0.5em">
<div style="padding: 0.5em">
Line 81: Line 83:
==Usage example:==
==Usage example:==
<div style="font-size:140%;"><pre><nowiki>
<div style="font-size:140%;"><pre><nowiki>
{{LSL_Function|name=llFunction|returnType=string
{{LSL_Function
|functionID=14|energy=10.0|sleep=0.0
|name=llFunction|14|0.0|10.0
|paramName1=avatar|paramType1=key|paramDesc1=This is a key parameter which expects to be passed a valid avatar key.
|r=string
|paramName2=widgets|paramType2=integer|paramDesc2=This is an integer parameter which indicates the number of widgets to process.
|p1=avatar
|paramName3=stickLength|paramType3=float|paramDesc3=This is a float parameter used to describe the length of the stick used to whack bad formatters.
|p1t=key
|description=This function consumes widgets while it simultaneously animates a person whacking bad formatters.  The widgets are destroyed.  This is the lede. <!-- yes, lede is a word -->  (short high-level description of function, a few sentences to a paragraph)
|p1d=This is a key parameter which expects to be passed a valid avatar key.
|p2=widgets
|p2t=integer
|p2d=This is an integer parameter which indicates the number of widgets to process.
|p3=stickLength
|p3t=float
|p3d=This is a float parameter used to describe the length of the stick used to whack bad formatters.
|tb=This function consumes widgets while it simultaneously animates a person whacking bad formatters.  The widgets are destroyed.  This is the lede. <!-- yes, lede is a word -->  (short high-level description of function, a few sentences to a paragraph)
|specification=This function performs this specific set of actions under these circumstances.  If the key passed to it is [[NULL_KEY]], then it will [[shout]] "Nobody's whacking!" on channel 0.
|specification=This function performs this specific set of actions under these circumstances.  If the key passed to it is [[NULL_KEY]], then it will [[shout]] "Nobody's whacking!" on channel 0.
|caveats=
|caveats=
Line 114: Line 123:


----
----
 
{{LSL_Function
{{LSL_Function|name=llFunction|returnType=string
|name=llFunction|14|0.0|10.0
|functionID=14|energy=10.0|sleep=0.0
|r=string
|paramName1=avatar|paramType1=key|paramDesc1=This is a key parameter which expects to be passed a valid avatar key.
|p1=avatar
|paramName2=widgets|paramType2=integer|paramDesc2=This is an integer parameter which indicates the number of widgets to process.
|p1t=key
|paramName3=stickLength|paramType3=float|paramDesc3=This is a float parameter used to describe the length of the stick used to whack bad formatters.
|p1d=This is a key parameter which expects to be passed a valid avatar key.
|description=This function consumes widgets while it simultaneously animates a person whacking bad formatters.  The widgets are destroyed.  This is the lede. <!-- yes, lede is a word -->  (short high-level description of function, a few sentences to a paragraph)
|p2=widgets
|p2t=integer
|p2d=This is an integer parameter which indicates the number of widgets to process.
|p3=stickLength
|p3t=float
|p3d=This is a float parameter used to describe the length of the stick used to whack bad formatters.
|tb=This function consumes widgets while it simultaneously animates a person whacking bad formatters.  The widgets are destroyed.  This is the lede. <!-- yes, lede is a word -->  (short high-level description of function, a few sentences to a paragraph)
|specification=This function performs this specific set of actions under these circumstances.  If the key passed to it is [[NULL_KEY]], then it will [[shout]] "Nobody's whacking!" on channel 0.
|specification=This function performs this specific set of actions under these circumstances.  If the key passed to it is [[NULL_KEY]], then it will [[shout]] "Nobody's whacking!" on channel 0.
|caveats=
|caveats=
Line 143: Line 158:
* (bulleted footnotes, if necessary - caveats should go in caveats section)
* (bulleted footnotes, if necessary - caveats should go in caveats section)
}}
}}
----
----



Revision as of 13:58, 25 January 2007


Experimental LSL Function Template

This is an experimental template for the LSL function page format.

Usage example:

{{LSL_Function
|name=llFunction|14|0.0|10.0
|r=string
|p1=avatar
|p1t=key
|p1d=This is a key parameter which expects to be passed a valid avatar key.
|p2=widgets
|p2t=integer
|p2d=This is an integer parameter which indicates the number of widgets to process.
|p3=stickLength
|p3t=float
|p3d=This is a float parameter used to describe the length of the stick used to whack bad formatters.
|tb=This function consumes widgets while it simultaneously animates a person whacking bad formatters.  The widgets are destroyed.  This is the lede. <!-- yes, lede is a word -->  (short high-level description of function, a few sentences to a paragraph)
|specification=This function performs this specific set of actions under these circumstances.  If the key passed to it is [[NULL_KEY]], then it will [[shout]] "Nobody's whacking!" on channel 0.
|caveats=
* Don't use this function to test whether a key is null.
* ''(if you know of none, try using:)'' None known
|examples=
<lsl>
default
{
    state_entry()
    {
        llSay(0,"The absolute value of -4 is: "+(string)llAbs(-4) );
    }
}
</lsl>
|helpers=
<lsl>
</lsl>
|seeAlso=
(similar [[LSL Functions|functions]], related [[LSL Examples|examples]] and pages, etc.)
|notes=
* (bulleted footnotes, if necessary - caveats should go in caveats section)
}}

Produces:


The correct title of this article is Template:llFunction. The initial letter is shown capitalized due to technical restrictions.

  WORK IN PROGRESS

(This style and layout is presumed to be not finalized yet - this needs to be rather finalized first.)

{

r=string

p1t=key p2t=integer p3t=float p4={{{p4}}} p5={{{p5}}} p6={{{p6}}} p7={{{p7}}} p8={{{p8}}} p9={{{p9}}}

tb=This function consumes widgets while it simultaneously animates a person whacking bad formatters. The widgets are destroyed. This is the lede. (short high-level description of function, a few sentences to a paragraph)

}}}

Specification

This function performs this specific set of actions under these circumstances. If the key passed to it is NULL_KEY, then it will shout "Nobody's whacking!" on channel 0.

Caveats

  • Don't use this function to test whether a key is null.
  • (if you know of none, try using:) None known

Examples

<lsl> default {

   state_entry()
   {
       llSay(0,"The absolute value of -4 is: "+(string)llAbs(-4) );
   }

} </lsl>

Helper Functions

<lsl> </lsl>

See Also

(similar functions, related examples and pages, etc.)

Notes

  • (bulleted footnotes, if necessary - caveats should go in caveats section)



Bugs

Suggested Changes