Template:Lua function
From GMod Wiki
| Function | |
| Syntax | Lua function( ) |
| Description: | |
| No description provided | |
| Returns: | nil |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Lua function]Lua function [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example Usage
{{Lua_function |
function_name = concommand.Add |
arguments = {{Arg|String}} commandName, {{Arg|Function}} commandFunction, {{Arg|Function}}:{{Arg|Table}}:{{Arg|String}} autoCompleteFunc |
description = Creates a console command that runs a function in Lua. autoCompleteFunc is optional. |
library = [[concommand]] |
lua_state = {{Shared}} |
returns = {{Arg|Nil}} |
dangerous = any value if dangerous |
laggy = any value if laggy |
const = any value if no arguments and brackets are required |
}}
- Note that when a function returns nothing you should simply omit the returns field altogether, this is only included for your convenience as part of the example.