From Bohemia Interactive Community
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