I have a trigger that calls my script. Nul = execVM "spawn.sqf";
The script is a simple spawn group:
_mygroup = [getmarkerPos "mygroupstart", EAST, ["O_officer_F","O_medic_F","O_engineer_F","O_Soldier_A_F","O_Soldier_lite_F","O_soldier_repair_F","O_soldier_UAV_F","O_Soldier_GL_F","O_soldier_exp_F","O_Soldier_A_F","O_medic_F","O_medic_F","O_Soldier_AR_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
_wp1 = _mygroup addWaypoint [getmarkerpos "wp1", 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointBehaviour "AWARE";
_wp1 setWaypointFormation "LINE";
_wp2 = _mygroup addWaypoint [getmarkerpos "wp2", 0];
_wp2 setWaypointType "SAD";
_wp2 setWaypointSpeed "NORMAL";
_wp2 setWaypointBehaviour "AWARE";
_wp2 setWaypointFormation "COLUMN";
_wp3 = _mygroup addWaypoint [getmarkerpos "mygroupstart", 0];
_wp3 setWaypointType "cycle";
_wp3 setWaypointSpeed "NORMAL";
_wp3 setWaypointBehaviour "AWARE";
_wp3 setWaypointFormation "COLUMN";
It works but kicks this error when trigger condition is met:
'...
private ["_skip"];
_skip = false;
if (|#|_minunits != -1) then
{
if (_i > (_min...'
Error undefined variable in expression: _minunits
File A3\functions_f\spawning\fn_spawnGroup.sqf, line 124
Please fix this urgently.