Difference between revisions of "User:Kebap"

From Mudlet
Jump to navigation Jump to search
m
Line 31: Line 31:
 
: Returns whatever the function returns.  
 
: Returns whatever the function returns.  
 
: See also: [[Manual:Lua_Functions#paste|paste]]
 
: See also: [[Manual:Lua_Functions#paste|paste]]
<br/>
+
 
 +
{{note}} Available since Mudlet 3.5
  
 
;Parameters
 
;Parameters
Line 38: Line 39:
 
* arg2:
 
* arg2:
 
: What arg2 is/does. Passed as a string.
 
: What arg2 is/does. Passed as a string.
* optionalArg3
+
* ''optionalArg3''
 
: (optional) The name needn't be telling. Relevant is to mark optional arguments at the start of this line (with text "optional" in brackets) and in the function definition line (with [these] brackets)
 
: (optional) The name needn't be telling. Relevant is to mark optional arguments at the start of this line (with text "optional" in brackets) and in the function definition line (with [these] brackets)
<br/>
 
  
;Examples
+
;Example
 
<lua>
 
<lua>
 
--a small example snippet of the function in action
 
--a small example snippet of the function in action

Revision as of 20:33, 9 August 2018

About me

Mudlet user and script developer, hailing from MorgenGrauen (German).

Projects

Examples for Wiki formatting

functionName

functionName(arg1, arg2, [optionalArg3])
What the function does. In this case, it is just a non-existing function with the only purpose to show, how to write documentation for functions
Returns whatever the function returns.
See also: paste

Note Note: Available since Mudlet 3.5

Parameters
  • arg1:
What arg1 is/does. Passed as a string.
  • arg2:
What arg2 is/does. Passed as a string.
  • optionalArg3
(optional) The name needn't be telling. Relevant is to mark optional arguments at the start of this line (with text "optional" in brackets) and in the function definition line (with [these] brackets)
Example

<lua> --a small example snippet of the function in action --the comments up top should introduce it/explain what the snippet does functionName("arg1", "arg2") </lua>