Difference between revisions of "Template:LSL Function"
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
|permission | |permission | ||
|negative_index | |negative_index | ||
}} | }} | ||
</pre> | </pre> | ||
Line 206: | Line 205: | ||
}} | }} | ||
</div> | </div> | ||
</noinclude><includeonly>{{#ifeq:{{{ | </noinclude><includeonly>{{#ifeq:{{{mode|}}}|request| | ||
<div id="box" style="background:red;"> | <div id="box" style="background:red;"> | ||
'''LSL Feature Request''' | '''LSL Feature Request''' | ||
Line 222: | Line 221: | ||
''' 'sort' should not equal the function name.''' | ''' 'sort' should not equal the function name.''' | ||
<div style="padding: 0.5em;background:#ffffff;"> | <div style="padding: 0.5em;background:#ffffff;"> | ||
''Please correct the sort value.''</div></div>{{# | ''Please correct the sort value.''</div></div>{{#if:{{{self|}}}|| [[Category:LSL FixMe]] }} }}{{#if:{{{return_text|}}}{{{func_desc|}}}|| | ||
<div id="box" style="background:yellow;"> | <div id="box" style="background:yellow;"> | ||
''' 'return_text' and 'func_desc' can both not be undefined''' | ''' 'return_text' and 'func_desc' can both not be undefined''' | ||
Line 271: | Line 270: | ||
|return_end=; | |return_end=; | ||
|template=LSLG | |template=LSLG | ||
|footer={{#ifeq:{{{ | |footer={{#ifeq:{{{mode|}}}|request||{{#if:{{{no_footer|}}}||:<div style="font-size:x-small;">This page is based on information gathered from the Second Life client {{HoverText|source|'linden\indra\lscript\lscript_library\lscript_library.cpp'}}, and as such has additional [http://secondlife.com/developers/opensource/licenses licensing restrictions].</div>}}}} | ||
|header_floater=<table> | |header_floater=<table> | ||
<tr> | <tr> | ||
<td> {{HoverText|{{#ifeq:{{{ | <td> {{HoverText|{{#ifeq:{{{mode|}}}|request|REQUEST|{{{func_id|}}}}}|The function index number.}} | ||
<td> {{LSLG|Function ID}} | <td> {{LSLG|Function ID}} | ||
</tr> | </tr> | ||
Line 286: | Line 285: | ||
</tr> | </tr> | ||
</table> | </table> | ||
}}{{#if:{{{self|}}}||{{#if:{{{sort|}}}|[[Category:LSL Functions|{{{sort|}}}]]}}{{#if: {{{permission|}}}|[[Category:LSL Requires Permissions|{{{sort|}}}]]}}{{#ifeq:{{{negative_index|}}}|true|[[Category:LSL Negative Index|{{{sort|}}}]]}}}}</includeonly> | }}{{#ifeq:{{{mode|}}}|request||{{#if:{{{self|}}}||{{#if:{{{sort|}}}|[[Category:LSL Functions|{{{sort|}}}]]}}{{#if: {{{permission|}}}|[[Category:LSL Requires Permissions|{{{sort|}}}]]}}{{#ifeq:{{{negative_index|}}}|true|[[Category:LSL Negative Index|{{{sort|}}}]]}}}}}}</includeonly> |
Revision as of 06:47, 6 February 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
{{LSL_Function |func |func_id |func_sleep |func_desc |func_footnote |return_type |return_text |p1_type|p1_name|p1_desc |p2_type|p2_name|p2_desc |p3_type|p3_name|p3_desc |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 |constants |spec |caveats |examples |helpers |also_header |also_functions |also_articles |also_footer |notes |mode |deprecated |sort |permission |negative_index }}
The LSL_Function template is a intermediate template for LSL_Generic, which handles the formating for both functions and events (LSL_Event is also an intermediate template). The main job of this template is to change the parameter, names & setup the right-side floater and set the additional copyright message. Also makes permission requirements a part of the template.
parameter | desc | example |
---|---|---|
func | Function name | |
func_id | Function Id | 1.0 |
func_sleep | Delay | 0.0 |
func_energy | Energy | 10.0 |
func_desc | Function description text. | Gives the monkey a banana |
func_footnote | Function footnote (appears after the parameters text). | Has the side effect of causing the avatar to run in circles shouting like on fire. |
return_type | return type | integer |
return_text | "Returns a return_type return_text" in most cases return_text can be used instead of func_desc. | that is a monkey |
p1_type | first parameter type | |
p1_name | first parameter name | |
p1_desc | first parameter desc | |
p2_type | second parameter type | |
p2_name | second parameter name | |
p2_desc | second parameter desc | |
... | ||
p12_type | twelfth parameter type | |
p12_name | twelfth parameter name | |
p12_desc | twelfth parameter desc | |
constants | constants area, no box, please use a table for this section. | |
spec | spec box | |
caveats | caveats box | |
examples | examples box | |
helpers | helper functions box | |
also_header | also header | |
also_functions | also functions indent | |
also_articles | also articles indent | |
also_footer | also footer | |
notes | notes box | |
mode | if mode equals 'god' then it is tagged as requiring godmode. | |
deprecated | Marks the function as deprecated. Set the value to the replacement functions name or 'none'. If it is not set to none and it is infact set, it will include a link to the replacement function. | |
sort | The sort value for use with categories. | GetTime |
permission | Set to the PERMISSION_* flag that the function requires. It will amend the appropriate fields to show this requirement (without all the haste of doing it yourself) | PERMISSION_CHANGE_LINKS |
negative_index | 'true', 'false' or nothing. If set to true or false then it amends the appropriate fields so that the function is marked as supporting or not supporting negative indexes. | true |
self | Special field that only requires a value for example uses of the function or if the page is a feature request. For feature requests set the value to 'request' |
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Examples