User:ArceusInator/Template:Function

From Legacy Roblox Wiki
Revision as of 03:42, 23 March 2011 by >ArceusInator
Jump to navigationJump to search

cellspacing="0" cellpadding="4" style="-webkit-border-radius: 6px; -moz-border-radius: 6px; background: #ffdddd; margin:0; width: 100%; font-size: 90%; text-align: left; align: center; padding: 4px; border: solid 4px #B57EDC;" |style="padding: 1;font-size:120%; font-weight:bold;" colspan="2"| [[{{{name}}} (Method)|{{{name}}}]]( {{{arguments}}} ) |-style="background: #FFFFFF;" |style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|Returns |style="border-top: solid 1px black;"|{{{returns}}} |-style="background: #ffdddd;" |style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|Description: |style="border-top: solid 1px black;"|{{{description}}} |-style="background: #FFFFFF;" |style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|Type:

|style="border-top: solid 1px black;"|Roblox Specific Function

Example Usage

This template has these properties:


name           : String
arguments      : String
description    : String
returns        : String = nil
protected      : Boolean = false
type           : type = roblox

These are the types that are used with the "type" property:

core
coroutine
string
table
math
roblox

Anything else acts as if it were set to "roblox"

Function

{{User:ArceusInator/Template:Function
|name        = LoadLibrary
|arguments   = [[String]] ''libraryName''
|returns     = [[Userdata]] ''requestedLibrary''
|description = Returns a library, 'libraryName' if it exists. Else, it returns nil and an error message for use with the assert function. 
|type        = roblox
}}

Results in


cellspacing="0" cellpadding="4" style="-webkit-border-radius: 6px; -moz-border-radius: 6px; background: #ffdddd; margin:0; width: 100%; font-size: 90%; text-align: left; align: center; padding: 4px; border: solid 4px #B57EDC;" |style="padding: 1;font-size:120%; font-weight:bold;" colspan="2"| LoadLibrary( String libraryName ) |-style="background: #FFFFFF;" |style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|Returns |style="border-top: solid 1px black;"|Userdata requestedLibrary |-style="background: #ffdddd;" |style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|Description: |style="border-top: solid 1px black;"|Returns a library, 'libraryName' if it exists. Else, it returns nil and an error message for use with the assert function. |-style="background: #FFFFFF;" |style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|Type:

|style="border-top: solid 1px black;"|Roblox Specific Function