Template:Function: Difference between revisions
Undo revision 1811 by Scuba Steve 9.0 (Talk) |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{ | <includeonly>{{ | ||
Function_wrapped | Function_wrapped | ||
| name ={{{name | |name ={{{name}}} | ||
| desc ={{{desc | |desc ={{{desc}}} | ||
| arg1_name ={{{arg1_name | |arg1_name ={{{arg1_name}}} | ||
| arg1_type ={{{arg1_type | |arg1_type ={{{arg1_type}}} | ||
| arg1_desc ={{{arg1_desc | |arg1_desc ={{{arg1_desc}}} | ||
| arg1_opt ={{{arg1_opt | |arg1_opt ={{{arg1_opt}}} | ||
| arg2_name ={{{arg2_name | |arg2_name ={{{arg2_name}}} | ||
| arg2_type ={{{arg2_type | |arg2_type ={{{arg2_type}}} | ||
| arg2_desc ={{{arg2_desc | |arg2_desc ={{{arg2_desc}}} | ||
| arg2_opt ={{{arg2_opt | |arg2_opt ={{{arg2_opt}}} | ||
| arg3_name ={{{arg3_name | |arg3_name ={{{arg3_name}}} | ||
| arg3_type ={{{arg3_type | |arg3_type ={{{arg3_type}}} | ||
| arg3_desc ={{{arg3_desc | |arg3_desc ={{{arg3_desc}}} | ||
| arg3_opt ={{{arg3_opt | |arg3_opt ={{{arg3_opt}}} | ||
| arg4_name ={{{arg4_name | |arg4_name ={{{arg4_name}}} | ||
| arg4_type ={{{arg4_type | |arg4_type ={{{arg4_type}}} | ||
| arg4_desc ={{{arg4_desc | |arg4_desc ={{{arg4_desc}}} | ||
| arg4_opt ={{{arg4_opt | |arg4_opt ={{{arg4_opt}}} | ||
| arg5_name ={{{arg5_name | |arg5_name ={{{arg5_name}}} | ||
| arg5_type ={{{arg5_type | |arg5_type ={{{arg5_type}}} | ||
| arg5_desc ={{{arg5_desc | |arg5_desc ={{{arg5_desc}}} | ||
| arg5_opt ={{{arg5_opt | |arg5_opt ={{{arg5_opt}}} | ||
| arg6_name ={{{arg6_name | |arg6_name ={{{arg6_name}}} | ||
| arg6_type ={{{arg6_type | |arg6_type ={{{arg6_type}}} | ||
| arg6_desc ={{{arg6_desc | |arg6_desc ={{{arg6_desc}}} | ||
| arg6_opt ={{{arg6_opt | |arg6_opt ={{{arg6_opt}}} | ||
| arg7_name ={{{arg7_name | |arg7_name ={{{arg7_name}}} | ||
| arg7_type ={{{arg7_type | |arg7_type ={{{arg7_type}}} | ||
| arg7_desc ={{{arg7_desc | |arg7_desc ={{{arg7_desc}}} | ||
| arg7_opt ={{{arg7_opt | |arg7_opt ={{{arg7_opt}}} | ||
| arg8_name ={{{arg8_name | |arg8_name ={{{arg8_name}}} | ||
| arg8_type ={{{arg8_type | |arg8_type ={{{arg8_type}}} | ||
| arg8_desc ={{{arg8_desc | |arg8_desc ={{{arg8_desc}}} | ||
| arg8_opt ={{{arg8_opt | |arg8_opt ={{{arg8_opt}}} | ||
| arg9_name ={{{arg9_name | |arg9_name ={{{arg9_name}}} | ||
| arg9_type ={{{arg9_type | |arg9_type ={{{arg9_type}}} | ||
| arg9_desc ={{{arg9_desc | |arg9_desc ={{{arg9_desc}}} | ||
| arg9_opt ={{{arg9_opt | |arg9_opt ={{{arg9_opt}}} | ||
| ret1_name ={{{ret1_name | |ret1_name ={{{ret1_name}}} | ||
| ret1_type ={{{ret1_type | |ret1_type ={{{ret1_type}}} | ||
| ret1_desc ={{{ret1_desc | |ret1_desc ={{{ret1_desc}}} | ||
| ret2_name ={{{ret2_name | |ret2_name ={{{ret2_name}}} | ||
| ret2_type ={{{ret2_type | |ret2_type ={{{ret2_type}}} | ||
| ret2_desc ={{{ret2_desc | |ret2_desc ={{{ret2_desc}}} | ||
| ret3_name ={{{ret3_name | |ret3_name ={{{ret3_name}}} | ||
| ret3_type ={{{ret3_type | |ret3_type ={{{ret3_type}}} | ||
| ret3_desc ={{{ret3_desc | |ret3_desc ={{{ret3_desc}}} | ||
| ret4_name ={{{ret4_name | |ret4_name ={{{ret4_name}}} | ||
| ret4_type ={{{ret4_type | |ret4_type ={{{ret4_type}}} | ||
| ret4_desc ={{{ret4_desc | |ret4_desc ={{{ret4_desc}}} | ||
| ret5_name ={{{ret5_name | |ret5_name ={{{ret5_name}}} | ||
| ret5_type ={{{ret5_type | |ret5_type ={{{ret5_type}}} | ||
| ret5_desc ={{{ret5_desc | |ret5_desc ={{{ret5_desc}}} | ||
| ret6_name ={{{ret6_name | |ret6_name ={{{ret6_name}}} | ||
| ret6_type ={{{ret6_type | |ret6_type ={{{ret6_type}}} | ||
| ret6_desc ={{{ret6_desc | |ret6_desc ={{{ret6_desc}}} | ||
| ret7_name ={{{ret7_name | |ret7_name ={{{ret7_name}}} | ||
| ret7_type ={{{ret7_type | |ret7_type ={{{ret7_type}}} | ||
| ret7_desc ={{{ret7_desc | |ret7_desc ={{{ret7_desc}}} | ||
| ret8_name ={{{ret8_name | |ret8_name ={{{ret8_name}}} | ||
| ret8_type ={{{ret8_type | |ret8_type ={{{ret8_type}}} | ||
| ret8_desc ={{{ret8_desc | |ret8_desc ={{{ret8_desc}}} | ||
| ret9_name ={{{ret9_name | |ret9_name ={{{ret9_name}}} | ||
| ret9_type ={{{ret9_type | |ret9_type ={{{ret9_type}}} | ||
| ret9_desc ={{{ret9_desc | |ret9_desc ={{{ret9_desc}}} | ||
| notes ={{{notes | |notes ={{{notes}}} | ||
}}</includeonly> | }}</includeonly> | ||
<noinclude> | <noinclude> | ||
{{Function/doc}} | {{Function/doc}} | ||
</noinclude> | </noinclude> |
Revision as of 09:06, 5 April 2011
When adding a function definition to a page, you only need to include as many arg?_ and ret?_ variables as are necessary to describe the function. Feel free to copy/paste the code below and fill in the necessary elements.
Due to the way that MediaWiki interprets consecutive braces ({) in wikicode, if you wish to include a table definition such as {{index1, index2}, {index1, index2}}, you'll need to either utilize Template:(( and/or Template:)) or wrap the table definition in <nowiki></nowiki> tags. The use of <pre></pre> or <source></source> tags is recommended for multi-line examples.
arg?_type should be one of the lua types. [nil, boolean, number, string, function, userdata, thread, table]
{{Function | name = | desc = | arg1_name = | arg1_type = | arg1_desc = | arg1_opt = | arg2_name = | arg2_type = | arg2_desc = | arg2_opt = | arg3_name = | arg3_type = | arg3_desc = | arg3_opt = | arg4_name = | arg4_type = | arg4_desc = | arg4_opt = | arg5_name = | arg5_type = | arg5_desc = | arg5_opt = | arg6_name = | arg6_type = | arg6_desc = | arg6_opt = | arg7_name = | arg7_type = | arg7_desc = | arg7_opt = | arg8_name = | arg8_type = | arg8_desc = | arg8_opt = | arg9_name = | arg9_type = | arg9_desc = | arg9_opt = | ret1_name = | ret1_type = | ret1_desc = | ret2_name = | ret2_type = | ret2_desc = | ret3_name = | ret3_type = | ret3_desc = | ret4_name = | ret4_type = | ret4_desc = | ret5_name = | ret5_type = | ret5_desc = | ret6_name = | ret6_type = | ret6_desc = | ret7_name = | ret7_type = | ret7_desc = | ret8_name = | ret8_type = | ret8_desc = | ret9_name = | ret9_type = | ret9_desc = | notes = }}
This function will in turn call Template:Function_wrapped