Jump to content
Sign in to follow this  
mihikle

Module not finding .Sqf

Recommended Posts

Hey all,

Thought I might try to make a module for my missions, the module basically closes all the doors in the map. I have it working in a Mission Format, then I decided to put into a module format, just to see if I could do it type of thing. I think my Config is done right, as the Module appears in the Editor, and I can place it down easily onto the map.

However when I run the mission it says "Script not found \1RI_Door_Shut\module.sqf", even though module.sqf is present in the pbo. I've searched the forums and couldn't find anyone who's had the same problem so I can only assume it's me following a guide wrong lol. But if anyone could help me that would be great!

Config.cpp:

class CfgPatches {
class MyLogic {
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"ca_modules"};
};
};
class CfgVehicles {
class Logic;
class MyLogic : Logic {
	displayName = "1RI Shut Doors Module";
	icon = "\ca\ui\data\icon_functions_ca.paa";
	picture = "\ca\ui\data\icon_functions_ca.paa";
	vehicleClass = "Modules";

	class EventHandlers {
		init = "nul = _this execVM '\1RI_Door_Shut\module.sqf'";
	};
};
};

Cheers,

Mihikle.

Share this post


Link to post
Share on other sites

However when I run the mission it says "Script not found \1RI_Door_Shut\module.sqf", even though module.sqf is present in the pbo.

<snip>that was completely wrong n/m

taken from http://community.bistudio.com/wiki/Functions_Library

If 'file' path is not set, system will search for file 'functions\category\fn_function.sqf" (if function is defined in description.ext) or 'ca\modules\functions\category\fn_function.sqf" (if function is in config.cpp).

Edited by MadM0nkey

Share this post


Link to post
Share on other sites

How do I go about setting the file path? Is '\1RI_Door_Shut\module.sqf' not enough or...? Never really done a Config before so I don't really know much about them!

Share this post


Link to post
Share on other sites
How do I go about setting the file path? Is '\1RI_Door_Shut\module.sqf' not enough or...? Never really done a Config before so I don't really know much about them!

I am not familiar working with creating modules, but code is code

so looking & comparing how "other scripts" define paths such as in warfare2 example:

InitMission.sqf

BIS_WF_Common SetVariable ["customTownsScript","Server\Config\Config_MapTowns.sqf"];//Custom town configurations.
BIS_WF_Common [color=#ff8c00]SetVariable[/color] [color=#ff8c00]["customTownPath","Server\Config\"];[/color]            //Use mission's dir for town configs path. Important! Leave this variable undefined unless you have custom script 

Warfare Module Init Field:

this SetVariable ["customInitMissionScript","InitMission.sqf",true];

this is what I <sniped> from above but only because obviously we are not talking about warfare2 init files

I am just trying to give you an example of how the script defines a path.. tho unclear if has to be done a specific way when creating modules.

maybe wait a bit and maybe someone who knows will jump in and help.

<edit>

in the meantime I was looking here http://community.bistudio.com/wiki/Arma_3_Module_Framework

and noticed a file path example for module functions

Configure a module function

Place class CfgFunctions to config.cpp. See Functions Library (Arma 3) for more info about functions configuration.

class CfgFunctions 
{
   class myTag
   {
       class Effects
       {
           [color=#ff8c00]file = "\myTag_addonName\functions";[/color]
           class moduleNuke{};
       };
   };
};

Write the module function

Create the functions folder within the addon folder and place *.sqf or *.fsm files there.

Example: \myTag_addonName\functions\fn_moduleNuke.sqf

Edited by MadM0nkey

Share this post


Link to post
Share on other sites

I realize this was forever ago, but did you ever resolve this? Trying to build my first module and having the exact same problem. I'm looking at the ACE and TFAR repos on GitHub, and it looks to me like I have exactly the same setup - no dice, though.

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  

×