Jump to content
jshock

fn_moduleExecute, BIS function Error

Recommended Posts

Hello All, as the title suggests, I have a mod that's currently WIP, and it has a couple of modules to allow for customization and modularity (obviously), everything within the mod including the information provided by these modules and the functions executed by the modules works without issue, however, I get the following error (I get it twice, my assumption is one per each of the modules placed). Note, I'm running only this mod, nothing else.
 

22:49:51 Error in expression <_fnc_moduleInit_modules",[]]);
_modules set [_modules find _logic,-1];
_logicMai>
22:49:51   Error position: <set [_modules find _logic,-1];
_logicMai>
22:49:51   Error Zero divisor
22:49:51 File A3\functions_f\Modules\fn_moduleExecute.sqf, line 52
22:49:51 Error in expression <_fnc_moduleInit_modules",[]]);
_modules set [_modules find _logic,-1];
_logicMai>
22:49:51   Error position: <set [_modules find _logic,-1];
_logicMai>
22:49:51   Error Zero divisor
22:49:51 File A3\functions_f\Modules\fn_moduleExecute.sqf, line 52

I'm still relatively new to the whole mod making/module defining world, so I'm sure it's something as simple as a missing config entry for each module, but I cannot for the life of me see what it may be.
 
Here are the .hpp for each module:
 

CfgVehicles-

class Logic;
class Module_F: Logic
{
	class ArgumentsBaseUnits
	{
		class Units;
	};
	class ModuleDescription
	{
		class EmptyDetector;
	};
};

#include "\JSHK_contam\modules\JSHK_contamModule_areaModule.hpp"
#include "\JSHK_contam\modules\JSHK_contamModule_settingsModule.hpp"

Module #1-
 

class JSHK_contamModule_areaModule: Module_F
{
	scope = 2;
	displayName = "JSHK Contam Area";
	category = "JSHK_contamModule_cat";
	//icon = "\JSHK_contam\modules\data\icon_ca.paa";
	
	function = "JSHK_contamModule_fnc_moduleAreas";
	functionPriority = 1;
	isGlobal = 2;
	isTriggerActivated = 1;
	isDisposable = 1;
	is3DEN = 0;
	
	//curatorInfoType = "RscDisplayAttributecontamAreaModule";
	
	class Arguments: ArgumentsBaseUnits
	{
		class Units: Units {};
		class JSHK_contamModuleVar_useModulePos
		{
			displayName = "Use module position";
			description = "Use the module as a center point for an area";
			typeName = "BOOL";
			defaultValue = true;
		};
		class JSHK_contamModuleVar_radius
		{
			displayName = "Radius of Contamination";
			description = "Default: 100 meters";
			typeName = "NUMBER";
			defaultValue = 100;
		};
		class JSHK_contamModuleVar_showMarker
		{
			displayName = "Show Area on Map";
			description = "Create a marker on the map to show the radius of the area";
			typeName = "BOOL";
			defaultValue = false;
		};
		class JSHK_contamModuleVar_alphaMarker
		{
			displayName = "Type of Marker";
			description = "Type of marker displayed on map";
			typeName = "NUMBER";
			class values
			{
				class none {name = "No Marker"; value = 0; default = 1;};
				class transparent {name = "Transparent Marker"; value = -2; default = 1;};
				class basic {name = "Basic Marker"; value = 1; default = 1;};
				class warning {name = "Warning Area Marker"; value = -1; default = 1;};
			};
		};
	};
	
	class ModuleDescription: ModuleDescription
	{
		description = "JSHK Contamination Area Module";
		sync[] = {"EmptyDetector"};
		
		class EmptyDetector
		{
			position = 1;
			direction = 0;
			optional = 1;
			duplicate = 1;
			synced[] = {"EmptyDetector"};
		};
	};
};

 
Module #2-
 

class JSHK_contamModule_settingsModule: Module_F
{
	scope = 2;
	displayName = "JSHK Contam Settings";
	category = "JSHK_contamModule_cat";
	//icon = "\JSHK_contam\modules\data\icon_ca.paa";
	
	function = "JSHK_contamModule_fnc_moduleSettingsValues";
	functionPriority = 1;
	isGlobal = 2;
	isTriggerActivated = 0;
	isDisposable = 1;
	is3DEN = 0;
	
	class Arguments: ArgumentsBaseUnits
	{
		class JSHK_contamModuleVar_gasMasks
		{
			displayName = "Types of Gas Masks";
			description = "Classnames of gas masks (seperate by commas)";
			typeName = "STRING";
			defaultValue = "";
		};
		class JSHK_contamModuleVar_requireDetector
		{
			displayName = "Require Detector";
			description = "Require wrist worn detector to hear contamination area warning sound";
			typeName = "BOOL";
			defaultValue = true;
		};
		class JSHK_contamModuleVar_autoRecovery
		{
			displayName = "Auto Recovery";
			description = "After taking damage from area, enable recovery from that damage (VANILLA ONLY)";
			typeName = "BOOL";
			defaultValue = false;
		};
		class JSHK_contamModuleVar_useMaskSound
		{
			displayName = "Mask Sound";
			description = "Enable default mask sound";
			typeName = "BOOL";
			defaultValue = true;
		};
		class JSHK_contamModuleVar_enableDebug
		{
			displayName = "Enable Debug";
			description = "Enable to send messages to the rpt regarding addon status";
			typeName = "BOOL";
			defaultValue = false;
		};
	};
	
	class ModuleDescription: ModuleDescription
	{
		description = "JSHK Contamination Settings Module";
		sync[] = {};
	};
};

Share this post


Link to post
Share on other sites

Had these issues as well with my modules, but by setting isDisposable to 0 it didn't do it any more.

Couldn't find anything else that did it.

  • Like 1

Share this post


Link to post
Share on other sites

Had these issues as well with my modules, but by setting isDisposable to 0 it didn't do it any more.

Couldn't find anything else that did it.

Yup, that seemed to do the trick, I don't know if turning that on or off is an issue in the long run, but simple enough fix for the time being, thanks.

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

×