User:Draugath: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
Explode test: {{#explode: Test,123,abc|,|1}}
I'm going to be working on a series of Templates for easing the creation of function entries and producing identical results across all function entries.
I'm going to be working on a series of Templates for easing the creation of function entries and producing identical results across all function entries.


Line 8: Line 11:
This template will initially be the one that provides the final output.  More templates may be created later.<br />
This template will initially be the one that provides the final output.  More templates may be created later.<br />
[[Template:Function_wrapped]]
[[Template:Function_wrapped]]
==Example==
<pre>
{{Function
| name        =FunctionName
| desc        =Function description
| arg1_name    =arg1
| arg1_type    =number
| arg1_desc    =argument (1,2,...,n) description, including examples if so desired
| arg2_name    =arg2
| arg2_type    =string
| arg2_desc    =argument (1,2,...,n) description, including examples if so desired
| arg3_name    =arg3
| arg3_type    =string
| arg3_desc    =argument (1,2,...,n) description, including examples if so desired
| arg3_opt    =true
| ret1_name    =ret1
| ret1_type    =string
| ret1_desc    =return value (1,2,...,n) description, including examples if so desired
| ret2_name    =ret2
| ret2_type    =table
| ret2_desc    =return value (1,2,...,n) description, including examples if so desired
| notes        =notes
}}
</pre>
{{Function
| name        = FunctionName
| desc        = Function description
| arg1_name    = arg1
| arg1_type    = number
| arg1_desc    = argument (1,2,...,n) description, including examples if so desired
| arg2_name    = arg2
| arg2_type    = string
| arg2_desc    = argument (1,2,...,n) description, including examples if so desired
| arg3_name    = someoddtable
| arg3_type    = table
| arg3_desc    = {number test1, string test2}
| arg4_name    = arg4
| arg4_opt    = true
| arg4_type    = string
| arg4_desc    = argument (1,2,...,n) description, including examples if so desired
| ret1_name    = ret1
| ret1_type    = string
| ret1_desc    = return value (1,2,...,n) description, including examples if so desired
| ret2_name    = ret2
| ret2_type    = table
| ret2_desc    = return value (1,2,...,n) description, including examples if so desired
| notes        = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris lorem, scelerisque sed facilisis ut, mattis ut dui. In vestibulum porttitor dolor et scelerisque. Quisque dolor ante, ullamcorper vitae posuere ut, ornare rutrum lacus. Vestibulum eget luctus mi. Cras et interdum augue. Vivamus erat lorem, aliquet tristique hendrerit a, eleifend nec ante. Maecenas volutpat mattis dui ac cursus. Nunc in turpis augue, eget pharetra arcu. Nulla porta laoreet erat sit amet semper. Fusce dignissim sodales accumsan. Cras nisl sem, imperdiet quis convallis vel, feugiat a massa. Cras venenatis tristique odio, et faucibus ligula adipiscing eget.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris lorem, scelerisque sed facilisis ut, mattis ut dui. In vestibulum porttitor dolor et scelerisque. Quisque dolor ante, ullamcorper vitae posuere ut, ornare rutrum lacus. Vestibulum eget luctus mi. Cras et interdum augue. Vivamus erat lorem, aliquet tristique hendrerit a, eleifend nec ante. Maecenas volutpat mattis dui ac cursus. Nunc in turpis augue, eget pharetra arcu. Nulla porta laoreet erat sit amet semper. Fusce dignissim sodales accumsan. Cras nisl sem, imperdiet quis convallis vel, feugiat a massa. Cras venenatis tristique odio, et faucibus ligula adipiscing eget.
}}
<pre>
{{Function
| name      = GetTargetInfo
| desc      = get info about target
| ret1_name  = name
| ret1_type  = string
| ret1_desc  =
| ret2_name  = health
| ret2_type  = number
| ret2_desc  = health in percent
| ret3_name  = dist
| ret3_type  = number
| ret3_desc  = distance in m
| ret4_name  = factionid
| ret4_type  = number
| ret4_desc  = faction of target
| ret5_name  = guild
| ret5_type  = string
| ret5_desc  = guild tag of target
| ret6_name  = ship
| ret6_type  = string
| ret6_desc  = name of targets ship
}}
</pre>
{{Function
| name      = GetTargetInfo
| desc      = get info about target
| ret1_name  = name
| ret1_type  =
| ret1_desc  =
| ret2_name  = health
| ret2_type  = number
| ret2_desc  = health in percent
| ret3_name  =
| ret3_type  = number
| ret3_desc  = distance in m
| ret4_name  = factionid
| ret4_type  = number
| ret4_desc  = faction of target
| ret5_name  = guild
| ret5_type  = string
| ret5_desc  = guild tag of target
| ret6_name  = ship
| ret6_type  = string
| ret6_desc  = name of targets ship
}}

Latest revision as of 06:40, 18 October 2011

Explode test: 123


I'm going to be working on a series of Templates for easing the creation of function entries and producing identical results across all function entries.

Template:Function

This template will be the top-level wrapper template that handles input and passing of information.
Template:Function

Template:Function_wrapped

This template will initially be the one that provides the final output. More templates may be created later.
Template:Function_wrapped

Example

{{Function
| name         =FunctionName
| desc         =Function description
| arg1_name    =arg1
| arg1_type    =number
| arg1_desc    =argument (1,2,...,n) description, including examples if so desired
| arg2_name    =arg2
| arg2_type    =string
| arg2_desc    =argument (1,2,...,n) description, including examples if so desired
| arg3_name    =arg3
| arg3_type    =string
| arg3_desc    =argument (1,2,...,n) description, including examples if so desired
| arg3_opt     =true
| ret1_name    =ret1
| ret1_type    =string
| ret1_desc    =return value (1,2,...,n) description, including examples if so desired
| ret2_name    =ret2
| ret2_type    =table
| ret2_desc    =return value (1,2,...,n) description, including examples if so desired
| notes        =notes
}}

FunctionName

Definition
FunctionName( number  arg1,  string  arg2,  table  someoddtable [,  string  arg4 ]) ->  string  ret1,  table  ret2
Description
Function description
Arguments
Type Name Description
number arg1 argument (1,2,...,n) description, including examples if so desired
string arg2 argument (1,2,...,n) description, including examples if so desired
table someoddtable {number test1, string test2}
string arg4 argument (1,2,...,n) description, including examples if so desired (optional)
Returns
Type Name Description
string ret1 return value (1,2,...,n) description, including examples if so desired
table ret2 return value (1,2,...,n) description, including examples if so desired
Notes
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris lorem, scelerisque sed facilisis ut, mattis ut dui. In vestibulum porttitor dolor et scelerisque. Quisque dolor ante, ullamcorper vitae posuere ut, ornare rutrum lacus. Vestibulum eget luctus mi. Cras et interdum augue. Vivamus erat lorem, aliquet tristique hendrerit a, eleifend nec ante. Maecenas volutpat mattis dui ac cursus. Nunc in turpis augue, eget pharetra arcu. Nulla porta laoreet erat sit amet semper. Fusce dignissim sodales accumsan. Cras nisl sem, imperdiet quis convallis vel, feugiat a massa. Cras venenatis tristique odio, et faucibus ligula adipiscing eget. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris lorem, scelerisque sed facilisis ut, mattis ut dui. In vestibulum porttitor dolor et scelerisque. Quisque dolor ante, ullamcorper vitae posuere ut, ornare rutrum lacus. Vestibulum eget luctus mi. Cras et interdum augue. Vivamus erat lorem, aliquet tristique hendrerit a, eleifend nec ante. Maecenas volutpat mattis dui ac cursus. Nunc in turpis augue, eget pharetra arcu. Nulla porta laoreet erat sit amet semper. Fusce dignissim sodales accumsan. Cras nisl sem, imperdiet quis convallis vel, feugiat a massa. Cras venenatis tristique odio, et faucibus ligula adipiscing eget.
{{Function
| name       = GetTargetInfo
| desc       = get info about target
| ret1_name  = name
| ret1_type  = string
| ret1_desc  =
| ret2_name  = health
| ret2_type  = number
| ret2_desc  = health in percent
| ret3_name  = dist
| ret3_type  = number
| ret3_desc  = distance in m
| ret4_name  = factionid
| ret4_type  = number
| ret4_desc  = faction of target
| ret5_name  = guild
| ret5_type  = string
| ret5_desc  = guild tag of target
| ret6_name  = ship
| ret6_type  = string
| ret6_desc  = name of targets ship
}}

GetTargetInfo

Definition
GetTargetInfo() ->  name,  number  health,  number,  number  factionid,  string  guild,  string  ship
Description
get info about target
Returns
Type Name Description
name
number health health in percent
number distance in m
number factionid faction of target
string guild guild tag of target
string ship name of targets ship