fn vbs areEqual (VBS2)
From Bohemia Interactive Community
| Editors, please check Policy: Scripting Command Page Syntax. |
Click on the images for descriptions
Introduced in
- Game:
- Virtual Battlespace 2
- Version:
- 1.19
Description
- Description:
- Returns true if all of the passed data elements are of the same type and value. This function can safely compare all data types, even if data types are mixed or nil.
Syntax
- Syntax:
- comparelist call fn_vbs_areEqual
- Parameters:
- comparelist: Array - Array of Anything
- Return Value:
- Boolean
Examples
- Example 1:
_isEqual = [[1,2,3],[1,2,4]] call fn_vbs_arrayCompare
Additional Information
- Multiplayer:
- Behaviour unknown.
Notes
Notes
Notes
-
-This function is an improvement over the == operator, because
it can handle any data type in any combination.
-For arrays, it returns true if all arrays hold the same elements in the same order.
-If all values are undefined / nil / null, then this function will return true.
-Warning: Extremely large strings (>4k) or compiled code (from a file, for example) might not be properly compared, if they are only different near the end of the file.

