Difference between revisions of "LSL Function Style"

From Second Life Wiki
Jump to navigation Jump to search
m
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
{{LSL Header|ml=*}} __NOTOC__
<div id="box" style="background:#ffdead;">
Propose a style for the LSL function articles by creating an article in the following form: <nowiki>[[{{FULLPAGENAME}}/Your Resident name]]</nowiki>
&nbsp;&nbsp;'''WORK IN PROGRESS'''
<div style="padding: 0.5em;background:#ffffff;">
''(This style and layout is presumed to be not finalized yet - this needs to be rather finalized first.)''
</div>
</div>


{| width="100%"
General discussion should be held in [[Talk:LSL Function Style]], whereas questions regarding a specific implementation should be held in the relevant article's talk page.
|-
|valign="top"|
{{LslFunction|llFunction|0|0.0|10.0
|r=string
|rd=contains the name of the widget last consumed.
|p1t=key
|p1=avatar
|p1d=This is a key parameter which expects to be passed a valid avatar key.
|p2t=integer
|p2=widgets
|p2d=This is an integer parameter which indicates the number of widgets to process.
|p3t=float
|p3=stickLength
|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)
}}
|-
|


<div id="box">
== Requirements ==
== Specification ==
* Allows for accurate documentation
<div style="padding: 0.5em">
* Easy accessible to new and old scripters alike
This function performs this specific set of actions under these circumstances.  If the key passed to it is {{LSLG|NULL_KEY}}, then it will [[shout]] "Nobody's whacking!" on channel 0.
* Details common problems with solutions
</div>
</div>
|-
|
<div id="box">
== Caveats ==
<div style="padding: 0.5em">
* Don't use this function to test whether a key is null.
* ''(if you know of none, try using:)'' None known
</div>
</div>


|-
== Proposed Styles ==
|
<div id="box">
== Examples ==
<div style="padding: 0.5em">
<lsl>
default
{
    state_entry()
    {
        llSay(0,"The absolute value of -4 is: "+(string)llAbs(-4) );
    }
}
</lsl>


</div>
=== Round 1 ===
</div>
* [[{{PAGENAME}}/Celierra Darling|Celierra Darling]]
|-
* [[{{PAGENAME}}/Strife Onizuka|Strife Onizuka ''et al.'']]
|
* [[{{PAGENAME}}/SignpostMarv Martin|SignpostMarv Martin]]
<div id="box">


== Helper Functions ==
=== Round 2 ===
<div style="padding: 0.5em">
* [[User:Strife_Onizuka/LSL_Style|Strife Onizuka]] - tentative submission
<lsl>
</lsl>
</div>
</div>
|-
|
<div id="box">
== See Also ==
<div style="padding: 0.5em">
(similar functions, related examples and pages, etc.)
 
</div>
</div>
|-
|
<div id="box">
== Notes ==
<div style="padding: 0.5em">
(footnotes, if necessary - caveats should go in caveats section)
 
</div>
</div>
|}
 
----
----
----
 
{{LSLFunctionAll
|func=llVecNorm
|func_id=13
|func_sleep=0.0
|func_energy=10.0
|func_footnote=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)
|p1_type=key
|p1_name=avatar
|p1_desc=This is a key parameter which expects to be passed a valid avatar key.
|p2_type=integer
|p2_name=widgets
|p2_desc=This is an integer parameter which indicates the number of widgets to process.
|p3_type=float
|p3_name=stickLength
|p3_desc=This is a float parameter used to describe the length of the stick used to whack bad formatters.
|p4_type|p4_name|p4_desc
|p5_type|p5_name|p5_desc
|p6_type|p6_name|p6_desc
|p7_type|p7_name|p7_desc
|p8_type|p8_name|p8_desc
|p9_type|p9_name|p9_desc
|p10_type|p10_name|p10_desc
|p11_type|p11_name|p11_desc
|p12_type|p12_name|p12_desc
|return_type=string
|return_text=contains the name of the widget last consumed.
|spec=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.
|examples=<lsl></lsl>
|helpers=<lsl></lsl>
|related={{LSLG|llVecMag}}<br/>{{LSLG|llVecDist}}
|also= (similar functions, related examples and pages, etc.)
|notes= (footnotes, if necessary - caveats should go in caveats section)
}}

Latest revision as of 15:36, 24 October 2008