From KoLMafia
Jump to: navigation, search

This is the template to display a line of function information (for the function page template, see Template:FunctionPage).

Using This Template

  • "name" should be set to the name of the function, without parentheses (for link-building & displaying with parameters; parentheses will automatically be added by the template in the appropriate place).
  • "aggregate" should be listed and set to anything you'd like if the function returns an aggregate (map) data type. If this function returns a simple data type, delete this line.
  • "return_type" should be set to the datatype returned by the function.
  • "return_also" should be set to a secondary datatype. For instance, some functions can return both a string and a buffer. For most functions, which only return a single datatype, this line should be deleted.
  • "parameter1" through "parameter5" should be set to the parameters the function accepts. Each should be set using Template:Param. Use these parameters in order: don't start with "parameter2" if you don't include a "parameter1". (They can be listed in any order, if you really desire; you just can't skip an earlier parameter if you want them to display correctly.)
    • The first argument is the data type of the parameter
    • The second argument is the short description to display for the parameter (optional).
    • If the parameter is an aggregate, you should include "ag=yes" in the template call.
    • For more information, see Template:Param.
  • "p1desc" through "p5desc" are for long descriptions of the parameter. They will be displayed in list form below the function call line if used.
    • Again, it's recommended that you list them in numerical order.
    • For consistency, if you refer to the short description of the parameter, wrap it in Template:Pspan.
    • If you want sub-listing for the parameter description, use additional lines in the assignment that start with "**" to create a nested list.