Difference between revisions of "Template:SourceMod API"
m |
(Update template with docs) |
||
Line 1: | Line 1: | ||
− | <code>[https://sm.alliedmods.net/new-api/{{{file}}}/{{#if:{{{class|}}}|{{{class}}}/|}}{{{function}}} {{#if:{{{class|}}}|{{{class}}} | + | <code>[https://sm.alliedmods.net/new-api/{{{file}}}/{{#if:{{{class|}}}|{{{class}}}/|}}{{{function}}} {{#if:{{{class|}}}|{{{class}}}.|}}{{{function}}}]</code> |
+ | |||
+ | <noinclude> | ||
+ | This generates a link to the [https://sm.alliedmods.net/new-api/ SourceMod Scripting API reference] entry. | ||
+ | |||
+ | == Usage == | ||
+ | <nowiki>{{SourceMod API|file=datapack|class=DataPack|function=Reset}}</nowiki> | ||
+ | produces | ||
+ | :{{SourceMod API|file=datapack|class=DataPack|function=Reset}} | ||
+ | |||
+ | === Parameters === | ||
+ | ; file | ||
+ | : the source file that contains the function. | ||
+ | |||
+ | ; class | ||
+ | : optional. The methodmap class associated with a method. If this is present, the link will be displayed as <code>Class.Method</code>. | ||
+ | |||
+ | ; function | ||
+ | : the function / method / other identifier. | ||
+ | |||
+ | </noinclude> |
Revision as of 10:11, 15 October 2020
This generates a link to the SourceMod Scripting API reference entry.
Usage
{{SourceMod API|file=datapack|class=DataPack|function=Reset}}
produces
Parameters
- file
- the source file that contains the function.
- class
- optional. The methodmap class associated with a method. If this is present, the link will be displayed as
Class.Method
.
- function
- the function / method / other identifier.