AI mission spawned vehicles explode?

Doh.. okay I've added it to a sqf file and calling it in the init from the bottom..

Code:
[] execVM "custom\vehicle_fix\mission_fix.sqf";

The full path to the file

Test_server\MPMissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf

But I'm getting this error:

Code:
14:46:03 "PRELOAD_ Functions\init [[<No group>:0 (FunctionsManager)],any]"
14:46:03 "MPframework inited"
14:46:03 Error in expression <IN DOWN"];
};
waitUntil {vehicle player = player};
};>
14:46:03  Error position: <= player};
};>
14:46:03  Error Missing ;
14:46:03 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 9
14:46:03 Error in expression <IN DOWN"];
};
waitUntil {vehicle player = player};
};>
14:46:03  Error position: <= player};
};>
14:46:03  Error Missing ;
14:46:03 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 9
14:46:04 "Res3tting B!S effects..."
14:46:05 Cannot create non-ai vehicle MAP_Heli_H_army,
14:46:05 Error in expression <rus\custom\vehicle_fix\mission_fix.sqf"
while (true) do {
waitUntil {vehicle pla>
14:46:05  Error position: <while (true) do {
waitUntil {vehicle pla>
14:46:05  Error while: Type Bool, expected code
14:46:05 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 1
14:46:05 "HIVE: Starting"
 
Try this:

Code:
_true = 1;
while (_true == 1) do {
    waitUntil {(vehicle player != player);};
    _pVehicle = vehicle player;
    if (_pVehicle getVariable "Mission" == 1) then {
        cutText [format["This is a mission vehicle that will despawn on restart!"], "PLAIN DOWN"];
        sleep 5;
        cutText [format["You have been warned. Your loss if you leave anything inside it!"], "PLAIN DOWN"];
    };
    waitUntil {(vehicle player = player);};
};
 
Unfortunately something is still bugging out when starting the server:

Code:
15:37:55 "PRELOAD_ Functions\init [[<No group>:0 (FunctionsManager)],any]"
15:37:55 "MPframework inited"
15:37:55 Error in expression <N DOWN"];
};
waitUntil {(vehicle player = player);};
};>
15:37:55  Error position: <= player);};
};>
15:37:55  Error Missing )
15:37:55 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 10
15:37:55 Error in expression <N DOWN"];
};
waitUntil {(vehicle player = player);};
};>
15:37:55  Error position: <= player);};
};>
15:37:55  Error Missing )
15:37:55 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 10
15:37:57 Error in expression <vehicle_fix\mission_fix.sqf"
_true = 1;
while (_true == 1) do {
waitUntil {(vehi>
15:37:57  Error position: <while (_true == 1) do {
waitUntil {(vehi>
15:37:57  Error while: Type Bool, expected code
15:37:57 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 2
15:37:57 Cannot create non-ai vehicle MAP_Heli_H_army,
15:37:57 "Res3tting B!S effects..."
15:37:57 "HIVE: Starting"
 
Code:
Private ["_pVehicle"];
waitUntil {!isNil "dayz_animalCheck"};
while (alive player) do {
    waitUntil {vehicle player != player};
    _pVehicle = vehicle player;
    if (_pVehicle getVariable "Mission" == 1) then {
        cutText [format["This is a mission vehicle that will despawn on restart!"], "PLAIN DOWN"];
        sleep 5;
        cutText [format["You have been warned. Your loss if you leave anything inside it!"], "PLAIN DOWN"];
    };
    waitUntil {vehicle player = player};
};

Maybe?

I might just have a typo I'm looking at too hard.
 
Sorry still getting errors:

Code:
16:29:51 "PRELOAD_ Functions\init [[<No group>:0 (FunctionsManager)],any]"
16:29:51 "MPframework inited"
16:29:51 Error in expression <IN DOWN"];
};
waitUntil {vehicle player = player};
};>
16:29:51  Error position: <= player};
};>
16:29:51  Error Missing ;
16:29:51 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 11
16:29:51 Error in expression <IN DOWN"];
};
waitUntil {vehicle player = player};
};>
16:29:51  Error position: <= player};
};>
16:29:51  Error Missing ;
16:29:51 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 11
16:29:52 Cannot create non-ai vehicle MAP_Heli_H_army,
16:29:52 "Res3tting B!S effects..."
16:29:52 "HIVE: Starting"
 
Code:
Private ["_pVehicle"];
waitUntil {!isNil "dayz_animalCheck"};
while (alive player) do {
    waitUntil {vehicle player != player;};
    _pVehicle = vehicle player;
    if (_pVehicle getVariable "Mission" == 1) then {
        cutText [format["This is a mission vehicle that will despawn on restart!"], "PLAIN DOWN"];
        sleep 5;
        cutText [format["You have been warned. Your loss if you leave anything inside it!"], "PLAIN DOWN"];
    };
    waitUntil {vehicle player = player;};
};

If that doesn't work we're gonna have to wait until someone comes along and finds the error.
 
Well many thanks Vampire for your effort.

But it's still making some errors, so I hope someone can spot the error..

Here is the error log:

Code:
17:24:21 "PRELOAD_ Functions\init [[<No group>:0 (FunctionsManager)],any]"
17:24:21 "MPframework inited"
17:24:21 Error in expression <IN DOWN"];
};
waitUntil {vehicle player = player;};
};>
17:24:21  Error position: <= player;};
};>
17:24:21  Error Missing ;
17:24:21 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 11
17:24:21 Error in expression <IN DOWN"];
};
waitUntil {vehicle player = player;};
};>
17:24:21  Error position: <= player;};
};>
17:24:21  Error Missing ;
17:24:21 File mpmissions\dayz_1.Chernarus\custom\vehicle_fix\mission_fix.sqf, line 11
17:24:22 "Res3tting B!S effects..."
17:24:22 "HIVE: Starting"
 
Back
Top