isEqualTypeParams

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.54
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.54

Description

Description:
Compares types of all elements of input array to types of all elements of template array. Similar to isEqualTypeArray however this command is designed for fast validation of functions params, so there are differences:
  • Input can be anything but will be expected to be an Array, otherwise false is returned
  • Input array can be longer but not shorter than template array, will return false if shorter
  • nil could be used in template type array as a wild card to allow any type match

Syntax

Syntax:
input isEqualTypeParams template
Parameters:
input: Anything - could be value of any type, but only type Array will be validated
template: Array - array of expected types
Return Value:
Boolean

Examples

Example 1:
[1,2,player,"10"] isEqualTypeParams [0,0,objNull,""]; //true 123 isEqualTypeParams [0,0,objNull,""]; //false [] isEqualTypeParams [0,0,objNull,""]; //false [1,2,player] isEqualTypeParams [0,0,objNull,""]; //false [1,2,player,"10",true] isEqualTypeParams [0,0,nil,""]; //true [1,2,getPos player,"10",true] isEqualTypeParams [0,0,nil,""]; //true

Additional Information

Multiplayer:
-
See also:
isEqualTypeAllisEqualTypeAnyisEqualTypeisEqualTypeArrayparamparamsisEqualTotypeName

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

Notes

Bottom Section