isEqualTypeParams: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.54|= Game version | |1.54|= Game version | ||
|gr1= Variables | |gr1= Variables | ||
Line 12: | Line 12: | ||
* Input array can be longer but not shorter than template array, will return [[false]] if shorter | * 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 | * [[nil]] could be used in template type array as a wild card to allow any type match | ||
| | | input '''isEqualTypeParams''' template | ||
| [[ | |p1= input: [[Anything]] - could be value of any type, but only type [[Array]] will be validated | ||
|p2= template: [[Array]] - array of expected types | |||
| [[Boolean]] | |||
|x1= <code>[1,2,[[player]],"10"] [[isEqualTypeParams]] [0,0,[[objNull]],""]; //true | |x1= <code>[1,2,[[player]],"10"] [[isEqualTypeParams]] [0,0,[[objNull]],""]; //true | ||
Line 26: | Line 26: | ||
[1,2,[[player]]] [[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,[[player]],"10",[[true]]] [[isEqualTypeParams]] [0,0,[[nil]],""]; //true | ||
[1,2,[[getPos]] [[player]],"10",[[true]]] [[isEqualTypeParams]] [0,0,[[nil]],""]; //true</code> | [1,2,[[getPos]] [[player]],"10",[[true]]] [[isEqualTypeParams]] [0,0,[[nil]],""]; //true</code> | ||
|[[isEqualTypeAll]], [[isEqualTypeAny]], [[isEqualType]], [[isEqualTypeArray]], [[param]], [[params]], [[isEqualTo]], [[typeName]] | |[[isEqualTypeAll]], [[isEqualTypeAny]], [[isEqualType]], [[isEqualTypeArray]], [[param]], [[params]], [[isEqualTo]], [[typeName]] | ||
}} | }} |
Revision as of 00:40, 18 January 2021
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:
- Groups:
- Variables
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
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