Working with stacked event handlers by using BIS_fnc_ambientAnim and some event handlers for the curator (watch this threads first post for more information: http://forums.bistudio.com/showthread.php?176691-Making-placed-units-be-editable-for-every-Zeus ) I got this error quite a few times:
Error in expression <uments call _code;
} else {
_arguments call (call compile _code);
};
} forEach >
Error position: <call (call compile _code);
};
} forEach >
Error call: Type Script, expected code
File A3\Functions_F_EPA\Misc\fn_executeStackedEventHandler.sqf, line 41
Error in expression <uments call _code;
} else {
_arguments call (call compile _code);
};
} forEach >
Error position: <call (call compile _code);
};
} forEach >
Error generic error in expression
File A3\Functions_F_EPA\Misc\fn_executeStackedEventHandler.sqf, line 41
I assume it is due to following lines (ll.29-43) in the BIS_fnc_executeStackedEventhandlers file:
//Process data
{
//Data item parameters private ["_code", "_arguments"]; _code = [_x, 2, "", [{}, ""]] call BIS_fnc_param; _arguments = [_x, 3, []] call BIS_fnc_param; if (typeName _code != typeName "") then { //Execute code _arguments call _code; } else { //Execute function _arguments call (call compile _code); };
} forEach _data;
In line 41 there is a call two times. This construction would only NOT throw errors if the _code has another code as result.