Jump to content
Sign in to follow this  
daniel-davies

Zero divisor error in addAction

Recommended Posts

Hello all, 

I'm trying to create an action for an MP mission that simulates the lighting of a fuel can (which will then light oil on fire, leading to some explosives).

The script will still run, but I receive an error. I'm really struggling to fix it, any help will be greatly appreciated.

 

From my RPT file:

20:54:57 Error in expression <) do {

case (Fuel_Can_04) : {
{[(_this select 1)] execVM "Mission\Fuel_Can_Ligh>
20:54:57   Error position: <select 1)] execVM "Mission\Fuel_Can_Ligh>
20:54:57   Error Zero divisor

initPlayerLocal:

if (!isNil { Explosives_B }) then {
Fuel_Can_04 addAction ["Light fuel can", "mission\runFuelCanScript.sqf", nil,8,true,true,"","((_this distance _target) < 1.5)"];
};

runFuelCanScript:

(_this select 1) playMove "AinvPercMstpSrasWrflDnon_Putdown_AmovPercMstpSrasWrflDnon";


switch ((_this select 0)) do {


case (Fuel_Can_04) : {
[(_this select 1)] execVM "Mission\Fuel_Can_Light_A.sqf" remoteExec ["bis_fnc_call", 2];
};
case (Fuel_Can_06) : {
[(_this select 1)] execVM "Mission\Fuel_Can_Light_B.sqf" remoteExec ["bis_fnc_call", 2];
};
case (Fuel_Can_05) : {
[(_this select 1)] execVM "Mission\Fuel_Can_Light_C.sqf" remoteExec ["bis_fnc_call", 2];
};
case (Fuel_Can_01) : {
[(_this select 1)] execVM "Mission\Fuel_Can_Light_D.sqf" remoteExec ["bis_fnc_call", 2];
};
case (Fuel_Can_02) : {
[(_this select 1)] execVM "Mission\Fuel_Can_Light_E.sqf" remoteExec ["bis_fnc_call", 2];
};


};
 
Thanks in advance.

From my RPT file:

{[(_this select 1)] execVM "Mission\Fuel_Can_Ligh>
20:54:57   Error position: <select 1)] execVM "Mission\Fuel_Can_Ligh>
20:54:57   Error Zero divisor
 

Share this post


Link to post
Share on other sites

This, and all of them:

 

[(_this select 1)] execVM "Mission\Fuel_Can_Light_A.sqf" remoteExec ["bis_fnc_call", 2];
Should perhaps be this:

[(_this select 1), "Mission\Fuel_Can_Light_A.sqf"] remoteExec ["execVM", 2];
And, of course, respective filenames etc.

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
Sign in to follow this  

×