BIS fnc errorParamsType: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (fixed game version)
m (infobox to template)
Line 48: Line 48:
if !(_this isEqualTypeParams [0,[],nil,objNull]) exitWith {[_this,"isEqualTypeParams",[0,[],nil,objNull]] call BIS_fnc_errorParamsType};
if !(_this isEqualTypeParams [0,[],nil,objNull]) exitWith {[_this,"isEqualTypeParams",[0,[],nil,objNull]] call BIS_fnc_errorParamsType};
*/</pre>{{Informative|Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]]}} |Description=
*/</pre>{{placeholder}}<!-- Remove this after fill-in --> |Description=


|[] call [[BIS_fnc_errorParamsType]]|Syntax=
|[] call [[BIS_fnc_errorParamsType]]|Syntax=

Revision as of 16:27, 2 April 2019

Hover & click on the images for description

Description

Description:
/*
	Author: Killzone_Kid

	Description:
		Displays params type error message explaining the problem

	Parameter(s):
		0: ANY - actual input
		1: STRING - validation method - the name of type validation command used:
			*	"isEqualType"
			*	"isEqualTypeArray"
			*	"isEqualTypeAll"
			*	"isEqualTypeAny"
			*	"isEqualTypeParams"
		2: ANY - expected input type format

	Returns:
		NOTHING
	
	Example1:
		//Show error and abort if input is not of type ARRAY
		if !(_this isEqualType []) exitWith {[_this,"isEqualType",[]] call BIS_fnc_errorParamsType};
	
	Example2:
		//Show error and abort if array input is not in format [SCALAR,STRING,BOOL]
		if !(_this isEqualTypeArray [0,"",true]) exitWith {[_this,"isEqualTypeArray",[0,"",true]] call BIS_fnc_errorParamsType};
	
	Example3:
		//Show error and abort if array input is not in format [BOOL,BOOL,BOOL....]
		if !(_this isEqualTypeAll true) exitWith {[_this,"isEqualTypeAll",true] call BIS_fnc_errorParamsType};
		
	Example4:
		//Show error and abort if input is neither ARRAY nor OBJECT
		if !(_this isEqualTypeAny [[],objNull]) exitWith {[_this,"isEqualTypeAny",[[],objNull]] call BIS_fnc_errorParamsType};
	
	Example5:
		//Show error and abort if input is neither of type ARRAY nor array in format [SCALAR,ARRAY,<ANYTHING>,OBJECT....]
		if !(_this isEqualTypeParams [0,[],nil,objNull]) exitWith {[_this,"isEqualTypeParams",[0,[],nil,objNull]] call BIS_fnc_errorParamsType};
	
*/
Template:placeholder
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[] call BIS_fnc_errorParamsType
Parameters:
parameter: Datatype - (Optional, default defValue) description
Return Value:
Datatype - description

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