GetModuleInfo: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Added getModuleInfo)
 
mNo edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Server function}}  
{{Server function}}  
<!-- Describe in plain english what this function does. Don't go into details, just give an overview -->
This function returns information about the specified [[Modules|module]].
This function returns information about the specified module.


==Syntax==  
==Syntax==  
<!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd -->
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
table getModuleInfo (string moduleName, string informationToGet)
string getModuleInfo ( string moduleName, string information )
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''moduleName:''' A string containing the module you wish to get information of e.g. "hashing.dll"
*'''moduleName:''' A string containing the module you wish to get information of e.g. "hashing.dll"
*'''informationToGet:''' A string containing the information you wish to retrieve Currently supported information is Version, Name and Author.
*'''information:''' A string containing the information you wish to retrieve. Currently supported parametres are
**'''Version'''
**'''Name'''
**'''Author'''


===Returns===
===Returns===
<!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check -->
Returns a [[string]] with the requested information about the module. If invalid names for parameters are passed, it will return ''false''.
Returns a string with the requested information about the module. If The modulename is invalid or the informationToGet parameter is invalid it will return ''false''.


==Example==  
==Example==  
<!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized -->
<syntaxhighlight lang="lua">--TODO</syntaxhighlight>
 


==See Also==
==See Also==
<!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc -->
{{Module_functions}}
{{Module_functions}}

Revision as of 18:51, 18 May 2009

This function returns information about the specified module.

Syntax

string getModuleInfo ( string moduleName, string information )

Required Arguments

  • moduleName: A string containing the module you wish to get information of e.g. "hashing.dll"
  • information: A string containing the information you wish to retrieve. Currently supported parametres are
    • Version
    • Name
    • Author

Returns

Returns a string with the requested information about the module. If invalid names for parameters are passed, it will return false.

Example

--TODO

See Also