Jump to content

Recommended Posts

Do not working, really appreciate any help.

          |

         \/

debug console

[p0,[["B_Heli_Transport_01_F"],["B_Slingload_Cargo_01_F"],["B_quadbike_01_F","B_quadbike_01_F"],"",false]] call shd;

init.sqf

ahd = [];
shd = {
	switch (playerside) do {
		case blufor: {
			_slo = "B_Slingload_01_Cargo_F";
		};
		case opfor; {
			_slo = "O_Slingload_01_Cargo_F";		
		};
	};
	_lv = 1;
	_slp = _this select 0;
	slghd = creategroup west;
	for "n" from 1 to count _this do {
		_la = format (_this select %1,_lv);
		_lv1 = 0;
		_lst4 = true;
		_lst = true;
		_lst1 = true;
		_loc = 0;
		while (_lst) do {
			if ((ahd find _lv1) != -1) then {
				_lv1 = _lv1 + 1;
			} else {
				ahd append _lv1;
				_lst = false;
			};
		};
		format (sthdd%1,_lv1) = false;
		_lo = createVehicle [(_la select 0) select 0, _slp, [], 0, "FLY"];
		createvehiclecrew _lo;
		If ((count _la select 0) > 1) then {
			_lo1 = createVehicle [(_la select 0) select 1, _slp, [], 0, "FLY"];
			while (_lst4) do {
				_lo1 setpos getpos _lo;
				sleep 0.5;
			};
		};
		if (!isnull (_la select 1)) then {
			_loc = createVehicle [_la select 1, _slp, [], 0, "FLY"];
			_lo setSlingLoad _loc;
			while (_lst1) do {
				if (alive crew _lo) then {
					if (format (sthdd%1,_lv1)) then {
						_lo setslingload objnull;
					};
					if (isnull getSlingLoad _lo) then {
						_lst4 = false;
						_lst1 = false;
						if (!isnull (_la select 2)) then {
							_lp = getpos _loc;
							_lp1 = getposatl _loc;
							{
								createvehicle [_x, _lp, [], 0, "NONE"];
								if ((_lp1 select 3) > 4) then {
									_x call KK_fnc_paraDrop;
								};
								sleep 0.5;
							} foreach (_la select 2);
						};
					};
				} else {
					_lst1 = false;
				};
			};
		} else {
			if (!isnull (_la select 2)) then {
				if (!(_lo canslingload _la select 2)) then {
					_loc = createVehicle [_slo, _slp, [], 0, "FLY"];
					while (_lst1) do {
						if (alive crew _lo) then {
							if (format (sthdd%1,_lv1)) then {
								_lo setslingload objnull;
							};
							if (isnull getSlingLoad _lo) then {
								_lst4 = false;
								_lst1 = false;
								_lp = getpos _loc;
								_lp1 = getposatl _loc;
								deletevehicle _loc;
								{
									createvehicle [_x, _lp, [], 0, "NONE"];
									if ((_lp1 select 3) > 100) then {
										_x call KK_fnc_paraDrop;
									};
									sleep 0.5;
								} foreach (_la select 2);
							};
						} else {
							_lst1 = false;
						};
					};
				} else {
					_loc = createVehicle [(_la select 2) select 0, _slp, [], 0, "FLY"];
					while (_lst1) do {
						if (alive crew _lo) then {
							if (format (sthdd%1,_lv1)) then {
								_lo setslingload objnull;
								_lst1 = true;
							};
							if (isnull getSlingLoad _lo) then {
								_lst4 = false;
								_lp = getpos _loc;
								_lp1 = getposatl _loc;
								if ((_lp1 select 3) > 100) then {
									_loc call KK_fnc_paraDrop;
								};
								if (count (_la select 2) > 1) then {
									{
										createvehicle [_x, _lp, [], 0, "NONE"];
										if ((_lp1 select 3) > 100) then {
										_x call KK_fnc_paraDrop;
										sleep 0.5;
									} foreach (_la select 2 set [0,objnull]);
								};
							};
						} else {
							_lst1 = false;
						};
					};
				};
				_lo setSlingLoad _loc;
			};
		};
		if (!isnull (_la select 3)) then {
			format (sthdhid%1,_lv1) = false;
			format (sthdcid%1,_lv1) = false;
			_lg = [_slp, side player, _la select 3] call BIS_fnc_spawnGroup;
			if (_la select 4) then {
				{
					if ((_loc emptyPositions "cargo") > 0) then {
						_x moveInCargo _loc;
					} else {
						_x moveInCargo _lo;
					};
				} foreach units _lg;
			} else {
				{
					_x moveInCargo _lo;
				} foreach units _lg;
			};
			_lg joing group player;
			_lst2 = true;
			_lst3 = false;
			while (lst2 or _lst3) do {
				if (format (sthdhid%1,_lv1)) then {
					{
						if ((vehicle _x) == _lo) then {
							[_lo,_x,130] execVM "eject.sqf";
						};
					} foreach units _lg;
				};
				if (_la select 4) then {
					_lst3 = true;
					if (format (sthdcid%1,_lv1)) then {
						{
							if ((vehicle _x) == _loc) then {
								[_loc,_x,130] execVM "eject.sqf";
							};
						} foreach units _lg;
					};
				};
			};
		};
		crew _lo joing slghd;
		[playerside,hq] commandchat "Transport identification: " + str (_lv1);
		if (_lv == count _this) then {
			slghd joing group player;
		};
		_lv = _lv + 1;
	};
};

Share this post


Link to post
Share on other sites

joing

LOL, this boy likes it hard. No -showScriptErrors, no syntax highlighter, obfuscated variables, not using BIKI ;)

  • Like 3

Share this post


Link to post
Share on other sites

joing

Still do not working, looks like system do not understanding shd as code at all.

Share this post


Link to post
Share on other sites

Still do not working, looks like system do not understanding shd as code at all.

What kind of errors the -showscripterrors gave you?

Share this post


Link to post
Share on other sites

What kind of errors the -showscripterrors gave you?

Nothing, if i gives any, i'm writing

Share this post


Link to post
Share on other sites

No one can help?

This is prety nice assets delivering script, if someone could help me make it work, it can be used by some much mission's makers.

Share this post


Link to post
Share on other sites

Well, let's see, what is it supposed to do, since I can't read your code, and what is it not doing or not working? And it would be a plus if you could provide the area of the code that would more than likely handle the portion that isn't working, so I don't go crossed-eyed trying to find it.

Share this post


Link to post
Share on other sites

Well, let's see, what is it supposed to do, since I can't read your code, and what is it not doing or not working? And it would be a plus if you could provide the area of the code that would more than likely handle the portion that isn't working, so I don't go crossed-eyed trying to find it.

 
Variables:
local|skript local, type, main section, 2-ndary section, meaning, special catigory, spesial category.
Examples:
lahd - Local array helicopter delivering,
shd - skript helicopter delivering,
_slo - skript local object,
_lv - local value,
varhdtpw - value actives requests helicopter delivering transport prise west.
 

debug console

[p0,[["B_Heli_Transport_01_F"],["B_Slingload_Cargo_01_F"],["B_quadbike_01_F","B_quadbike_01_F"],"",false]] call shd;     //[|'position'|,||[["|'transport'|"],["|'container'|"],["|'vehicles'|"],"|'infantry'|",|'board infantry in container?'|]||`first chopper,||[["|'transport'|"],["|'container'|"],["|'vehicles'|"],"|'infantry'|",|'board infantry in container?'|]||`second chopper] call shd;

init.sqf

ahd = [];
shd = {
    switch (playerside) do {    //creating value meaning;
        case blufor: {
            _slo = "B_Slingload_01_Cargo_F";
        };
        case opfor; {
            _slo = "O_Slingload_01_Cargo_F";        
        };
    };
    _lv = 1;     //for identificate which chopper `2;
    _slp = _this select 0;
    slghd = creategroup west;
    n = 0;     //just number (test)
    for "n" from 1 to count _this do {     //after 1-st ('position') do 'how much is there';;
        _la = format (_this select %1,_lv);    //marking current array;
        _lv1 = 0;
        _lst4 = true;
        _lst = true;
        _lst1 = true;
        _loc = 0;
        while (_lst) do {     //creating unique id of the helicopter;
            if ((ahd find _lv1) != -1) then {
                _lv1 = _lv1 + 1;
            } else {
                ahd append _lv1;
                _lst = false;
            };
        };
        format (sthdd%1,_lv1) = false;     //creating 'dropping' trigger state for the chopper;
        _lo = createVehicle [(_la select 0) select 0, _slp, [], 0, "FLY"];
        createvehiclecrew _lo;
        If ((count _la select 0) > 1) then {
            _lo1 = createVehicle [(_la select 0) select 1, _slp, [], 0, "FLY"];
            while (_lst4) do {
                _lo1 setpos getpos _lo;
                sleep 0.5;
            };
        };
        if (!isnull (_la select 1)) then {     //`1;
            _loc = createVehicle [_la select 1, _slp, [], 0, "FLY"];
            _lo setSlingLoad _loc;
            while (_lst1) do {     //checking for drop;
                if (alive crew _lo) then {     //if not alive stoping ckecing;
                    if (format (sthdd%1,_lv1)) then {
                        _lo setslingload objnull;
                    };
                    if (isnull getSlingLoad _lo) then {
                        _lst4 = false;
                        _lst1 = false;
                        if (!isnull (_la select 2)) then {
                            _lp = getpos _loc;
                            _lp1 = getposatl _loc;
                            {
                                createvehicle [_x, _lp, [], 0, "NONE"];
                                if ((_lp1 select 3) > 4) then {
                                    _x call KK_fnc_paraDrop;
                                };
                                sleep 0.5;
                            } foreach (_la select 2);
                        };
                    };
                } else {
                    _lst1 = false;
                };
            };
        } else {     //'1 if is container - cargo in container, if no container: ;
            if (!isnull (_la select 2)) then {
                if (!(_lo canslingload _la select 2)) then {
                    _loc = createVehicle [_slo, _slp, [], 0, "FLY"];
                    while (_lst1) do {
                        if (alive crew _lo) then {
                            if (format (sthdd%1,_lv1)) then {
                                _lo setslingload objnull;
                            };
                            if (isnull getSlingLoad _lo) then {
                                _lst4 = false;
                                _lst1 = false;
                                _lp = getpos _loc;
                                _lp1 = getposatl _loc;
                                deletevehicle _loc;
                                {
                                    createvehicle [_x, _lp, [], 0, "NONE"];
                                    if ((_lp1 select 3) > 100) then {
                                        _x call KK_fnc_paraDrop;
                                    };
                                    sleep 0.5;
                                } foreach (_la select 2);
                            };
                        } else {
                            _lst1 = false;
                        };
                    };
                } else {
                    _loc = createVehicle [(_la select 2) select 0, _slp, [], 0, "FLY"];
                    while (_lst1) do {
                        if (alive crew _lo) then {
                            if (format (sthdd%1,_lv1)) then {
                                _lo setslingload objnull;
                                _lst1 = true;
                            };
                            if (isnull getSlingLoad _lo) then {
                                _lst4 = false;
                                _lp = getpos _loc;
                                _lp1 = getposatl _loc;
                                if ((_lp1 select 3) > 100) then {
                                    _loc call KK_fnc_paraDrop;
                                };
                                if (count (_la select 2) > 1) then {
                                    {
                                        createvehicle [_x, _lp, [], 0, "NONE"];
                                        if ((_lp1 select 3) > 100) then {
                                        _x call KK_fnc_paraDrop;
                                        sleep 0.5;
                                    } foreach (_la select 2 set [0,objnull]);
                                };
                            };
                        } else {
                            _lst1 = false;
                        };
                    };
                };
                _lo setSlingLoad _loc;
            };
        };
        if (!isnull (_la select 3)) then {     //infantry have personal section with own checks for container;
            format (sthdhid%1,_lv1) = false;
            format (sthdcid%1,_lv1) = false;
            _lg = [_slp, side player, _la select 3] call BIS_fnc_spawnGroup;
            if (_la select 4) then {
                {
                    if ((_loc emptyPositions "cargo") > 0) then {
                        _x moveInCargo _loc;
                    } else {
                        _x moveInCargo _lo;
                    };
                } foreach units _lg;
            } else {
                {
                    _x moveInCargo _lo;
                } foreach units _lg;
            };
            _lg joing group player;
            _lst2 = true;
            _lst3 = false;
            while (lst2 or _lst3) do {     //forgot to add checking for presents of infantry in vehicle, will do later;
                if (format (sthdhid%1,_lv1)) then {
                    {
                        if ((vehicle _x) == _lo) then {
                            [_lo,_x,130] execVM "eject.sqf";
                        };
                    } foreach units _lg;
                _lst2 = false;
                };
                if (_la select 4) then {
                    _lst3 = true;
                    if (format (sthdcid%1,_lv1)) then {
                        {
                            if ((vehicle _x) == _loc) then {
                                [_loc,_x,130] execVM "eject.sqf";
                            };
                        } foreach units _lg;
                        _lst3 = false;
                    };
                };
            };
        };
        crew _lo joing slghd;     //`each chopper` crew joining `group`;
        [playerside,hq] commandchat "Transport identification: " + str (_lv1);
        if (_lv == count _this) then {     //if the chopper last then `group` joing to player (`for have deliverieng infantry before transports`);
             slghd joing group player;
         };
        _lv = _lv + 1;     //`2;
    };
};

 

Share this post


Link to post
Share on other sites

Rather perculiar use of format command. It is shame you can always check the syntax on BIKI.

Share this post


Link to post
Share on other sites

Rather perculiar use of format command. It is shame you can always check the syntax on BIKI.

i know what 'format' may not work, how i'm using it here, if you can advise how can i make what i need other way, i would really appreciate that.

Share this post


Link to post
Share on other sites

i know what 'format' may not work, how i'm using it here, if you can advise how can i make what i need other way, i would really appreciate that.

Your unorthodox use of format command should have spammed your .rpt and screen big time, but you claim you have no errors. This I find very hard to believe especially after you said you use -showScriptErrors

Share this post


Link to post
Share on other sites

Your unorthodox use of format command should have spammed your .rpt and screen big time, but you claim you have no errors. This I find very hard to believe especially after you said you use -showScriptErrors

I swear to god, is no one error, or error file,

i already said, i'll change it if you'll say what to change it on.

Share this post


Link to post
Share on other sites

I swear to god, is no one error, or error file,

i already said, i'll change it if you'll say what to change it on.

In this case count your { and }

number of { should be equal to the number of }

Share this post


Link to post
Share on other sites

In this case count your { and }

number of { should be equal to the number of }

Can you make an example?

Share this post


Link to post
Share on other sites

Can you make an example?

I think he means there's a } missing somewhere.

 

And about that format;

format (sthdhid%1,_lv1) = false;

that can't possibly work, right?

If you're creating dynamic variable names, this would work:

call compile format ["sthdhid%1 = false;", _lv1];

Share this post


Link to post
Share on other sites

 

I think he means there's a } missing somewhere.

 

And about that format;

format (sthdhid%1,_lv1) = false;

that can't possibly work, right?

If you're creating dynamic variable names, this would work:

call compile format ["sthdhid%1 = false;", _lv1];

Missing } - i checked all code like 5 times, looks 100% fine.

Format - thanks, will try.

Share this post


Link to post
Share on other sites
_this = [p0,[["B_Heli_Transport_01_F"],["B_Slingload_Cargo_01_F"],["B_quadbike_01_F","B_quadbike_01_F"],"",false]];
   switch (playerside) do {
    case blufor: {
     _slo = "B_Slingload_01_Cargo_F";
    };    case opfor; {
     _slo = "O_Slingload_01_Cargo_F";
      };   };   _lv = 1;
   _slp = _this select 0;
   slghd = creategroup west;
   for "n" from 1 to count _this do {
    _la = _this select _lv;
    _lv1 = 0;
    _lst4 = true;
    _lst = true;
    _lst1 = true;
    _loc = 0;
    while (_lst) do {
     if ((ahd find _lv1) != -1) then {
      _lv1 = _lv1 + 1;
     } else {
      ahd append _lv1;
      _lst = false;
   hint str(_lv1);
  };
    };
    call compile format ["sthdd%1 = false;", _lv1];
    _lo = createVehicle [(_la select 0) select 0, _slp, [], 0, "FLY"];
    createvehiclecrew _lo;
    If ((count _la select 0) > 1) then {
     _lo1 = createVehicle [(_la select 0) select 1, _slp, [], 0, "FLY"];
     while (_lst4) do {
      _lo1 setpos getpos _lo;
      sleep 0.5;
     };
    };
    if (!isnull (_la select 1)) then {
     _loc = createVehicle [_la select 1, _slp, [], 0, "FLY"];
     _lo setSlingLoad _loc;
     while (_lst1) do {
      if (alive crew _lo) then {
       if (call compile format ["sthdd%1", _lv1]) then {
        _lo setslingload objnull;
       };
       if (isnull getSlingLoad _lo) then {
        _lst4 = false;
        _lst1 = false;
        if (!isnull (_la select 2)) then {
         _lp = getpos _loc;
         _lp1 = getposatl _loc;
         {
          createvehicle [_x, _lp, [], 0, "NONE"];
          if ((_lp1 select 3) > 4) then {
           _x call KK_fnc_paraDrop;
          };
          sleep 0.5;
         } foreach (_la select 2);
        };
       };
      } else {
       _lst1 = false;
      };
     };
    } else {
     if (!isnull (_la select 2)) then {
      if (!(_lo canslingload _la select 2)) then {
       _loc = createVehicle [_slo, _slp, [], 0, "FLY"];
       while (_lst1) do {
        if (alive crew _lo) then {
         if (call compile format ["sthdd%1", _lv1]) then {
          _lo setslingload objnull;
         };
         if (isnull getSlingLoad _lo) then {
          _lst4 = false;
          _lst1 = false;
          _lp = getpos _loc;
          _lp1 = getposatl _loc;
          deletevehicle _loc;
          {
           createvehicle [_x, _lp, [], 0, "NONE"];
           if ((_lp1 select 3) > 100) then {
            _x call KK_fnc_paraDrop;
           };
           sleep 0.5;
          } foreach (_la select 2);
         };
        } else {
         _lst1 = false;
        };
       };
      } else {
       _loc = createVehicle [(_la select 2) select 0, _slp, [], 0, "FLY"];
       while (_lst1) do {
        if (alive crew _lo) then {
         if (call compile format ["sthdd%1", _lv1]) then {
          _lo setslingload objnull;
          _lst1 = true;
         };
         if (isnull getSlingLoad _lo) then {
          _lst4 = false;
          _lp = getpos _loc;
          _lp1 = getposatl _loc;
          if ((_lp1 select 3) > 100) then {
           _loc call KK_fnc_paraDrop;
          };
          if (count (_la select 2) > 1) then {
           {
            createvehicle [_x, _lp, [], 0, "NONE"];
            if ((_lp1 select 3) > 100) then {
            _x call KK_fnc_paraDrop;
            sleep 0.5;
           } foreach (_la select 2 set [0,objnull]);
          };
         };
        } else {
         _lst1 = false;
        };
       };
      };
      _lo setSlingLoad _loc;
     };
    };
    if (!isnull (_la select 3)) then {
     call compile format ["sthdihd%1 = false;", _lv1];
     call compile format ["sthdicd%1 = false;", _lv1];
     _lg = [_slp, side player, _la select 3] call BIS_fnc_spawnGroup;
     if (_la select 4) then {
      {
       if ((_loc emptyPositions "cargo") > 0) then {
        _x moveInCargo _loc;
       } else {
        _x moveInCargo _lo;
       };
      } foreach units _lg;
     } else {
      {
       _x moveInCargo _lo;
      } foreach units _lg;
     };
     _lg join group player;
     _lst2 = true;
     _lst3 = false;
     while (lst2 or _lst3) do {
      if (call compile format ["sthdihd%1", _lv1]) then {
       {
        if ((vehicle _x) == _lo) then {
         [_lo,_x,130] execVM "eject.sqf";
        };
       } foreach units _lg;
      };
      if (_la select 4) then {
       _lst3 = true;
       if (call compile format ["sthdicd%1", _lv1]) then {
        {
         if ((vehicle _x) == _loc) then {
          [_loc,_x,130] execVM "eject.sqf";
         };
        } foreach units _lg;
       };
      };
     };
    };
    crew _lo join slghd;
    [playerside,hq] commandchat "Transport identification: " + str (_lv1);
    if (_lv == count _this) then {
     slghd join group player;
    };
    _lv = _lv + 1;
   };

Still nothing.

Share this post


Link to post
Share on other sites

Missing } - i checked all code like 5 times, looks 100% fine.

 

 

Well according to my test you have 54 { and 53 }. You didn't count them manually 5 times did you?

Share this post


Link to post
Share on other sites

Well according to my test you have 54 { and 53 }. You didn't count them manually 5 times did you?

Didn't count them, if you can tell me where is that missing one shood be, would be great

Share this post


Link to post
Share on other sites

Didn't count them, if you can tell me where is that missing one shood be, would be great

I don't know where it is. In order to find it I need to understand your script, but I'd rather eat a handful of crushed glass and die in excruciating pain than have another look at your script.

  • Like 2

Share this post


Link to post
Share on other sites

I don't know where it is. In order to find it I need to understand your script, but I'd rather eat a handful of crushed glass and die in excruciating pain than have another look at your script.

 

:yeahthat:

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

×