Jump to content
  • 0

Help with script error


carl101

Question

Hi guys, im trying to add a fireworks display script to my Infi**** that is suppose to shoot fireworks above the selected player. But i am getting this error.

charge setPos position;
uiSleep 1;
deleteVehicle _charge;
};

>
21:11:06   Error position: <;
uiSleep 1;
deleteVehicle _charge;
};

>
21:11:06   Error Invalid number in expression
21:11:06 File z\addons\dayz_server\init\AH.sqf, line 9467

and this is the script

CreateFireworks =
    {
     {
      if(name _x == _this select 0) then  
      {
       systemChat format["<Fireworks baby!> Spawning Fireworks on : %1",name _x];
       
       _fn_air_explosion = 
       {
        private ["_position", "_type", "_charge"];
        position = this select 0;
        type = this select 1;
        charge = type createVehicle _position;
        charge setPos position;
        uiSleep 1;
        deleteVehicle _charge;
       };
       
       _fn_firework = 
       {
        private ["_position", "_type", "_ball", "_smoke"];
        position = this select 0;
        type = this select 1;
        _ball = createVehicle ["Baseball", [0,0,0], [], 0, "CAN_COLLIDE"];
        _smoke = createVehicle ["SmokeShellRed", [0,0,0], [], 0, "CAN_COLLIDE"];
        _smoke attachTo [_ball, [0,0,0]];
        ball setPos position;
        uiSleep 4;
        _ball setVelocity [5 - (random 10),5 - (random 10),50];
        uiSleep 2;
        position = getPos ball;
        deleteVehicle _ball;
        deleteVehicle _smoke;
        [_position, type] spawn fn_air_explosion;
       };
       [getPos x, "HelicopterExploSmall"] call fn_firework;
      };
     }forEach playableUnits;
    };

Any help is appreciated, thanks

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...