Jump to content

Recommended Posts

Please help me to find mistake

Strange is that what i see t , but dont t1 .

switch (vard) do {
	case 0: {
		execVM "ar\sarsm";
	};
	case 1: {
                hint "t";
		execVM "ar\sarhd";
	};
	case 20: {

ar\sarhd.sqf

_lv = 0;
_lot1 = 0;
_lot2 = 0;

hint "t1";
hint "Click on map, insertion point, //target point, leaving point.";
onMapSingleClick "pari = _pos;lvar = 1; onMapSingleClick ''; true";
waituntil {lvar == 1};
hint str (pari);
onMapSingleClick "part = _pos;lvar = 2; onMapSingleClick ''; true";
waituntil {lvar == 2};
hint str (part);
onMapSingleClick "parl = _pos;lvar = 3; onMapSingleClick ''; true";
waituntil {lvar == 3};
hint str (parl);
if (vcpointsw >= (varp + varhdp)) then {
	vcpointsw = vcpointsw - (varp + varhdp);
	_lot = createVehicle [aarhdv select floor random count aarhdv, pari, [], 0, "FLY"];
	_lot setfuel 0.4;
	createVehicleCrew _lot;
	if (vart <= 10) then {
		_lu = aaru select floor random count aaru;
		if (vart != 10) then {
			_loc = createVehicle ["B_Slingload_01_Cargo_F", pari, [], 0, "FLY"];
			_lot setSlingLoad _loc;
			if (vart > 1) then {
				_lgt = group ((crew _lot) select 0);
				_lot1 = createVehicle [aarhdv select floor random count aarhdv, pari, [], 0, "FLY"];
				_lot setfuel 0.4;
				createVehicleCrew _lot1;
				crew _lot1 join _lgt;
				if (vart > 2) then {
					_lot2 = createVehicle [aarhdv select floor random count aarhdv, pari, [], 0, "FLY"];
					_lot setfuel 0.4;
					createVehicleCrew _lot2;
					crew _lot2 join _lgt;
				};
			};
		} else {
			_loc = createVehicle [_lou, pari, [], 0, "FLY"];
			_lot setSlingLoad _loc;
		};
		crew _lot join group player;
		//_lwt = _lgt addWaypoint [partw, 1];
		//_lwt setWaypointType "MOVE";
		//_lgt setCurrentWaypoint _lwt;
		//_lwl = _lgt addWaypoint [parlw, 2];
		//_lwl setWaypointType "MOVE";
		//_lgt setCurrentWaypoint _lwl;
		while {_lv == 0} do {
			if (isnull getSlingLoad _lot) then {
				sleep 1;
				//if (alive _loc) then {
					_lp = getPos _loc;
					deleteVehicle _loc;
					_lou = createVehicle [_lou, _lp, [], 0, "NONE"];
					//createVehicleCrew _lou;
					_lou setvehicleammo 0.3;
					_lou setfuel 0.3;
					//crew _lou join group player;
					//{
					//addSwitchableUnit _x;
					//} foreach crew _lou;
					cmIlias addCuratorEditableObjects [[_lou],true];
				//};
				_lv == 1;
				sleep 180;
				if (vart == 1) then {
					if (alive _lot) then {
						vcpointsw = vcpointsw + varhdp;
						{
						_lot deleteVehicleCrew _x;
						} foreach crew _lot;
						deleteVehicle _lot;
					};
				} else {
					if (vart == 2) then {
						if (alive _lot) then {
							vcpointsw = vcpointsw + (vartp / 2);
							{
							_lot deleteVehicleCrew _x;
							} foreach crew _lot;
							deleteVehicle _lot;
						};
						if (alive _lot1) then {
							vcpointsw = vcpointsw + (vartp / 2);
							{
							_lot1 deleteVehicleCrew _x;
							} foreach crew _lot1;
							deleteVehicle _lot1;
						};
					} else {
						if (vart == 3) then {
							if (alive _lot) then {
								vcpointsw = vcpointsw + (vartp / 3);
								{
								_lot deleteVehicleCrew _x;
								} foreach crew _lot;
								deleteVehicle _lot;
							};
							if (alive _lot1) then {
								vcpointsw = vcpointsw + (vartp / 3);
								{
								_lot1 deleteVehicleCrew _x;
								} foreach crew _lot1;
								deleteVehicle _lot1;
							};
							if (alive _lot2) then {
								vcpointsw = vcpointsw + (vartp / 3);
								{
								_lot2 deleteVehicleCrew _x;
								} foreach crew _lot2;
								deleteVehicle _lot2;
							};
						};
					};
				};
			};
		};
	};
} else {
	hint str (Not enough command  points);
};

Share this post


Link to post
Share on other sites

Where/how is the switch statement and  script being executed?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×