BIS_fnc_param

From Bohemia Interactive Community
Revision as of 19:42, 3 April 2006 by BIS fnc exportFunctionsToWiki (talk) (Generated by BIS_fnc_exportFunctionsToWiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Hover & click on the images for description

Description

Description:
/*

	Description:
	Define script parameter

	Parameter(s):
	_this select 0: ARRAY			- list of params
	_this select 1: NUMBER			- selected index
	_this select 2 (Optional): ANY		- default param (used when param is missing or of wrong type)
						- you can overload default value by setting 'BIS_fnc_<functionName>_<index>'
	_this select 3 (Optional): ARRAY	- list of allowed type examples (e.g. ["",[],0,objnull])
	_this select 4 (Optional): NUMBER	- If value is ARRAY, checks if it has required number of elements

	Returns:
	ANY - either value from list of params, or default value
*/

///////////////////////////////////////////////////////////////////////////////////////////////////////////

#define FNC_DISABLEERRORS \
	private ["_disableErrors"]; \
	_disableErrors = false;

//	_disableErrors = if (count _this > 5) then {_this select 4} else {false};

#define FNC_TEXTTYPES \
	private ["_textTypes"];\
	_textTypes = "";\
	{\
		_textTypes = _textTypes + typename _x;\
		if (_forEachIndex < count _types - 1) then {_textTypes = _textTypes + ", "};\
	} foreach _types;

///////////////////////////////////////////////////////////////////////////////////////////////////////////

(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:

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