Jump to content
Sign in to follow this  
The Real Bunc

Solved -Help with Config please

Recommended Posts

I'm working my way towards encapsulating one of my scripts as an addon but am hitting a brick wall with my config and a file not being found.

 

My folder structure is:

 Arma 3\@dynamicCamo with two subfolders \functions and \Addons

 

in the functions folder I have dynamicCamo1.sqf - the function Im trying to convert to an addon ( currently using a placeholder function till I get the details of how to do this right)

I had a look at the Arma 3 Samples Addons - there is one for functions and I adapted that to produce my configs.

 

This is the config.cpp

---------------------------------------------------------------------------------------------------------------

/*  */
#include "basicDefines_A3.hpp"
#include "cfgPatches.hpp"

class cfgFunctions
{
    
    class BNC // tag
    {
        class dynamicCamo // This represents a group of functions
        {
            file="@dynamiccamo\functions\"; // Where my functions are
            class dynamicCamo1 {}; // [] call BNC_fnc_dynamiccamo1
                        
                        description = "dynamic camo for Player when using cover, at night etc"
                        postInit =1 // 1 to call the function upon mission start, after objects are initialized.                                     //Passed arguments are ["postInit"]
        };            
        

    };
};

------------------------------------------------------------------------------------------

and this is cfgPatches

-------------------------------------------------------------------------------------------

class CfgPatches
{
    class DynamicCamo
    {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {};
    };
};

---------------------------------------------------------------------------------

 

Ive kept it pretty bare bones until I get the basics right.

 

I can pack the files  config.cpp and cfgPatches and the function folder into PBO and then I drop that PBO into the @dynamicCamo\addons folder.

I can load the packed mod then in launcher but when I go in game I get the message that fn_dynamiccamo.sqf can't be found.

I'm struggling to work out what is wrong with the configs or what Im doing wrong. My tag shows up in the functions viewer.

Any help or pointers would be appreciated.

 

The EXACT error message Im getting is 

"Script @dynamicCamo\functions\\fn_dynamicCamo1.sqf can not be found"

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

trying to trak down what the problem is I looked again at the function viewer.

My tag and the name of the function show up in the function viewer.

In the function viewer in very feint text below the name of functions it shows the path.

Interestingly for other functions there is no \ double slash in the path as there is in the error report I am receiving

and in the entry for what should be my function it's also showing the path with a double slash as follows

@dynamicCamo\functions\\fn_dynamiccamo1.sqf

So clearly something in my config or the construction of my folders is causing Arma to think there is a double slash in my path to the script.

Anyone? 

Share this post


Link to post
Share on other sites

Solved the douuble slash bt taking the trailing slash out of this part of the config.cpp

 file="@dynamiccamo\functions\"; // Where my functions are

 

Its still reporting its not finding my function file though. Im stuck now.

Share this post


Link to post
Share on other sites

Ok solved I think. Apparently, the script file has to be named as follows for some reason 

fn_dynamicCamo.sqf rather than simply dynamicCamo.sqf.  Strange because I had thought Id seen in PBOs

where the scripts didn't have fn_ as a prefix in their name. 

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  

×