Description
Checks the output of the array syntax of callExtension for an error. If an error is found, it is reported with BIS_fnc_error and the function returns true.
- If the error code (third element) is above 0, the engine reported an error; the reported message depends on the code:
- 101 - "SYNTAX_ERROR_WRONG_PARAMS_SIZE"
- 102 - "SYNTAX_ERROR_WRONG_PARAMS_TYPE"
- 201 - "PARAMS_ERROR_TOO_MANY_ARGS"
- 301 - "EXECUTION_WARNING_TAKES_TOO_LONG"
- any other code - "UNKNOWN_ERROR"
- Otherwise, if the return code (second element) is negative, the extension itself reported an error and its output string is used as the error message ("Generic Error" if the string is empty).
If the input is not an array of format [String, Number, Number], the function returns false without reporting anything.
Contact functions use it after every call to their extensions, e.g. BIN_fnc_addObjectsToArea and BIN_fnc_getObjectBoundingBarrel (extension "biext_collisions") or BIN_fnc_preInitEM and BIN_fnc_deleteAntenna (extension "biext_txscan"). It works with the output of any extension and can be used in scripts as well.
Note
This content is exclusive to the Arma 3 Contact Expansion.
Syntax
extensionOutput call BIN_fnc_isExtensionError
Parameters:
-
extensionOutput: Array - output ofextensionName callExtension [function, arguments], format [result, returnCode, errorCode]:
Returns: Boolean - true if an error was detected (and reported), otherwise false
Examples
Example 1
private _result = "biext_collisions" callExtension ["addObjectsToArea", _args];
if (_result call BIN_fnc_isExtensionError) exitWith { [0] }; // the error has already been reported
parseSimpleArray (_result select 0);