Page MenuHomeFeedback Tracker

BIS_fnc_executeStackedEventhandlers thorwing erros
New, WishlistPublic

Description

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.

Details

Legacy ID
1182920276
Severity
None
Resolution
Open
Reproducibility
Sometimes
Category
Scripting

Event Timeline

Fett_Li edited Steps To Reproduce. (Show Details)Jun 3 2014, 2:31 AM
Fett_Li edited Additional Information. (Show Details)
Fett_Li set Category to Scripting.
Fett_Li set Reproducibility to Sometimes.
Fett_Li set Severity to None.
Fett_Li set Resolution to Open.
Fett_Li set Legacy ID to 1182920276.May 7 2016, 6:42 PM