Skip to content

Commit

Permalink
new method for direct call
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 committed Jul 8, 2016
1 parent b04c7c9 commit 16f7346
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions addons/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ class CfgPatches {

#include "CfgVehicles.hpp"
#include "CfgLocationTypes.hpp"

class CBA_DirectCall {
class dummy;
};
6 changes: 4 additions & 2 deletions addons/common/fnc_directCall.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description:
Parameters:
_code - Code to execute <CODE>
_arguments - Parameters to call the code with. [optional] <ANY>
_arguments - Parameters to call the code with. (optional) <ANY>
Returns:
_return - Return value of the function <ANY>
Expand All @@ -26,6 +26,8 @@ params [["_CBA_code", {}, [{}]], ["_CBA_arguments", []]];

private "_CBA_return";

"_CBA_return = _CBA_arguments call _CBA_code" configClasses (configFile >> "CBA_DirectCall");
isNil {
_CBA_return = _CBA_arguments call _CBA_code;
};

if (!isNil "_CBA_return") then {_CBA_return};

0 comments on commit 16f7346

Please sign in to comment.