BIS_fnc_errorParamsType

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Arma 3 version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.00

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};
	
*/
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)

Syntax

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

Examples

Example 1:
Example needed

Additional Information

Execution:
call
Multiplayer:
-
See also:
See also needed

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To