mirror of
https://github.com/IT07/a3_vemf_reloaded.git
synced 2024-08-30 16:52:11 +00:00
Fixed "undefined variable in expression" error
This commit is contained in:
parent
fcc7f91f00
commit
d2db020b85
@ -19,6 +19,7 @@ _ok = false;
|
|||||||
_missionName = param [3, "", [""]];
|
_missionName = param [3, "", [""]];
|
||||||
if (_missionName in ("missionList" call VEMFr_fnc_getSetting)) then
|
if (_missionName in ("missionList" call VEMFr_fnc_getSetting)) then
|
||||||
{
|
{
|
||||||
|
scopeName "main";
|
||||||
private ["_mineSetting"];
|
private ["_mineSetting"];
|
||||||
_mineSetting = ([[_missionName],["mines"]] call VEMFr_fnc_getSetting) select 0;
|
_mineSetting = ([[_missionName],["mines"]] call VEMFr_fnc_getSetting) select 0;
|
||||||
if (_mineSetting > 0) then
|
if (_mineSetting > 0) then
|
||||||
@ -39,24 +40,14 @@ if (_missionName in ("missionList" call VEMFr_fnc_getSetting)) then
|
|||||||
_amount = ([[_missionName],["minesAmount"]] call VEMFr_fnc_getSetting) select 0;
|
_amount = ([[_missionName],["minesAmount"]] call VEMFr_fnc_getSetting) select 0;
|
||||||
if (_amount > -1) then
|
if (_amount > -1) then
|
||||||
{
|
{
|
||||||
switch _mineSetting do
|
private ["_mineTypes"];
|
||||||
{
|
if (_mineSetting isEqualTo 1) then { _mineTypes = ["ATMine"] };
|
||||||
case 1:
|
if (_mineSetting isEqualTo 2) then { _mineTypes = ["APERSMine"] };
|
||||||
{
|
if (_mineSetting isEqualTo 3) then { _mineTypes = ["ATMine","APERSMine"] };
|
||||||
_mineTypes = ["ATMine"]
|
if (_mineSetting < 1 OR _mineSetting > 3) then
|
||||||
};
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
_mineTypes = ["APERSMine"]
|
|
||||||
};
|
|
||||||
case 3:
|
|
||||||
{
|
|
||||||
_mineTypes = ["ATMine","APERSMine"]
|
|
||||||
};
|
|
||||||
default
|
|
||||||
{
|
{
|
||||||
["fn_placeMines", 0, "Invalid mines mode!"] spawn VEMFr_fnc_log;
|
["fn_placeMines", 0, "Invalid mines mode!"] spawn VEMFr_fnc_log;
|
||||||
};
|
breakOut "main"
|
||||||
};
|
};
|
||||||
|
|
||||||
_mines = [];
|
_mines = [];
|
||||||
@ -65,7 +56,7 @@ if (_missionName in ("missionList" call VEMFr_fnc_getSetting)) then
|
|||||||
{
|
{
|
||||||
private ["_mine"];
|
private ["_mine"];
|
||||||
_mine = createMine [selectRandom _mineTypes, ([_pos, _min, _max, 2, 0, 20, 0] call BIS_fnc_findSafePos), [], 0];
|
_mine = createMine [selectRandom _mineTypes, ([_pos, _min, _max, 2, 0, 20, 0] call BIS_fnc_findSafePos), [], 0];
|
||||||
uiSleep (0.5 + random 1);
|
uiSleep 0.1;
|
||||||
_mines pushBack _mine;
|
_mines pushBack _mine;
|
||||||
};
|
};
|
||||||
_ok = [_mines];
|
_ok = [_mines];
|
||||||
|
Loading…
Reference in New Issue
Block a user