Forum Jump :

Author Message


Posts: 10
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#170708 Posted at 2014-09-17 22:28        
     
Okay I took a look but I unfortunately don't have the knowledge to understand exactly what is happening here. This is what the function spits out:


/*
Author: Josef Zemanek

Description:
Limits support runs during a mission.

Parameter(s):
_this select 0: OBJECT - Requester module
_this select 1: STRING - Support type:
"Artillery"
"Transport"
"CAS_Heli"
"CAS_Bombing"
"Drop"
_this select 2: NUMBER - Support run limit
-1: Unlimited

Returns:
nothing
*/

_requester = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
_suppType = [_this, 1, "", [""]] call BIS_fnc_param;
_limit = [_this, 2, -1, [-1]] call BIS_fnc_param;

if (_limit < 0) then {_limit = 10e10};

_requester setVariable [format ["BIS_SUPP_limit_%1", _suppType], _limit, TRUE];

BIS_supp_refresh = TRUE; publicVariable "BIS_supp_refresh";

TRUE;


So I've set up a test scenario with one man "Man1" synced with a support requester module "Mod1". Man1 has _nul = [] execVM "script.sqf" in his init. Here is what I've attempted.

_requester = [_this, 0, Mod1, [Man1]] call BIS_fnc_param;
_suppType = [_this, 1, "Artillery", [""]] call BIS_fnc_param;
_limit = [_this, 2, -1, [-1]] call BIS_fnc_param;


My thinking is that man1 who is snyched to mod1 should be able to call in any type of artillery support an infinite ammount of times. Can anyone spot what I am doing wrong here?