BIS fnc exportFunctionsToWiki: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(First parameter is an array, using previous version of examples would lead to a script error and the default value of exporting every function to your clipboard.)
(Page filling - missing see also)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Export function descriptions to Community Wiki. Exported text will be copied to clipboard in XML format.<br />
'''Wiki Admins''' can import them using '''[[Special:Import]]'''.<br />
If the page already exists, it will be replaced only when timestamp is newer. |= Description
____________________________________________________________________________________________


Description:
| [filter, timestamp] call [[BIS_fnc_exportFunctionsToWiki]] |= Syntax
Export function descriptions to Community Wiki.
Exported text will be copied to clipboard in XML format.
Import it to wiki using https://community.bistudio.com/wiki?title=Special:Import
If the page already exists, it will be replaced only when timestamp is newer.


Parameter(s):
|p1= filter: [[Array]] - (Optional) functions filter in format [tags,categories,functions]:
0: ARRAY - functions filter in format [<tags>,<categories>,<functions>]
* tags: [[String]] or [[Array]] of [[String]] - CfgFunctions tags (e.g., "BIS"). Use empty string for all of them.
tags: STRING or ARRAY of STRINGs - CfgFunctions tags (e.g., "BIS"). Use empty string for all of them.
* categories: [[String]] or [[Array]] of [[String]] - categories (e.g., "Debug"). Use empty string for all of them.
categories: STRING or ARRAY of STRINGs - categories (e.g., "Debug"). Use empty string for all of them.
* functions: [[String]] or [[Array]] of [[String]] - specific function names (e.g., "BIS_fnc_log"). Use empty string for all of them. |= Parameter 1
functions: STRING or ARRAY of STRINGs - specific function names (e.g., "BIS_fnc_log"). Use empty string for all of them.
1 (Optional) STRING - timestamp in format "2013-09-12T16:00:00Z"


Returns:
|p2= timestamp: [[String]] - (Optional) in format "2013-09-12T16:00:00Z" |= Parameter 2
STRING - exported text


Example:
| [[String]] - exported text |= Return value
Export all functions: [] spawn bis_fnc_exportFunctionsToWiki;
Export all Array functions: [["","Arrays"]] spawn bis_fnc_exportFunctionsToWiki;
Export specific functions: [["","",["BIS_fnc_log","BIS_fnc_param"]]] spawn bis_fnc_exportFunctionsToWiki;
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_exportFunctionsToWiki]]; --> |= Syntax
|x1= <code>[] [[spawn]] [[BIS_fnc_exportFunctionsToWiki]]; {{codecomment|// export all functions}}</code> |= Example 1


|p1= |= Parameter 1
|x2= <code><nowiki>[</nowiki>["","Arrays"]] [[spawn]] [[BIS_fnc_exportFunctionsToWiki]]; {{codecomment|// export all Array functions}}</code> |= Example 2


| |= Return value
|x3= <code><nowiki>[</nowiki>["","",["BIS_fnc_log","BIS_fnc_param"]]] [[spawn]] [[BIS_fnc_exportFunctionsToWiki]]; {{codecomment|// export specific functions}}</code> |= Example 3
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|exec= spawn |= Execution
____________________________________________________________________________________________


| |= See also
| |= See also

Revision as of 10:36, 21 April 2018


Hover & click on the images for description

Description

Description:
Export function descriptions to Community Wiki. Exported text will be copied to clipboard in XML format.
Wiki Admins can import them using Special:Import.
If the page already exists, it will be replaced only when timestamp is newer.
Execution:
spawn
Groups:
Uncategorised

Syntax

Syntax:
[filter, timestamp] call BIS_fnc_exportFunctionsToWiki
Parameters:
filter: Array - (Optional) functions filter in format [tags,categories,functions]:
  • tags: String or Array of String - CfgFunctions tags (e.g., "BIS"). Use empty string for all of them.
  • categories: String or Array of String - categories (e.g., "Debug"). Use empty string for all of them.
  • functions: String or Array of String - specific function names (e.g., "BIS_fnc_log"). Use empty string for all of them.
timestamp: String - (Optional) in format "2013-09-12T16:00:00Z"
Return Value:
String - exported text

Examples

Example 1:
[] spawn BIS_fnc_exportFunctionsToWiki; // export all functions
Example 2:
[["","Arrays"]] spawn BIS_fnc_exportFunctionsToWiki; // export all Array functions
Example 3:
[["","",["BIS_fnc_log","BIS_fnc_param"]]] spawn BIS_fnc_exportFunctionsToWiki; // export specific functions

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section