Skip to content

Commit

Permalink
Merge pull request #391 from CBATeam/unique-variable-names-direct-call
Browse files Browse the repository at this point in the history
Use unique local variable names in CBA_fnc_directCall
  • Loading branch information
Killswitch00 authored Jun 23, 2016
2 parents 01ca3e2 + 8762fd6 commit 3177bc5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions addons/common/fnc_directCall.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ Returns:
Examples:
(begin example)
0 spawn {{systemChat str (call CBA_fnc_isScheduled)} call CBA_fnc_directCall}
0 spawn { {systemChat str canSuspend} call CBA_fnc_directCall; };
-> false
(end)
Author:
commy2
---------------------------------------------------------------------------- */
#include "script_component.hpp"

params [["_code", {}, [{}]], ["_arguments", []]];
params [["_CBA_code", {}, [{}]], ["_CBA_arguments", []]];

private "_return";
private "_CBA_return";

"_return = _arguments call _code" configClasses (configFile >> "CBA_DirectCall");
"_CBA_return = _CBA_arguments call _CBA_code" configClasses (configFile >> "CBA_DirectCall");

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

0 comments on commit 3177bc5

Please sign in to comment.