Jump to content
Eutyches

Config.cpp Errors in Custom Version of Theseus Services (FOSS)

Recommended Posts

UPDATE: RESOLVED (8/5/18)

Dear Arma Community,

I am in the final stages of preparing a custom version of the open source Theseus Services mod (Steam Workshop, GitHub) for my squad. I am brand new to modding, and my work is entirely a set of simple reskins -- some of the assets with the same names as those included in the original mod and some new models.

Thus far, everything that I have tested has worked. Yet now that I have gone through the process of adding our "new" assets to the various CfgVehicles, CfgWeapons, and config files, I keep receiving errors about my /addons/headgear/config.cpp file. Sometimes, I am told that I am missing a comma; other times, it is a bracket. Yet all that I did is copy and paste the original format of each entry for the document, replacing the relevant text with the names of or file paths to my own content.

Is there something about the documents or the structure of the Theseus Services mod that is keeping me from adding my own assets to those configuration files? Am I missing something in this particular file? All of my troubleshooting has reached a dead end, which is why I am turning to this forum for help.

Thank you.

Here is the original file:

#include "script_component.hpp"

class CfgPatches {
    class ADDON {
        name = COMPONENT_NAME;
        units[] = {
            QCLASS(Item_Cap_Headphones_BlackLogo),
            QCLASS(Item_Cap_BlackLogo),
            QCLASS(Item_Cap_TanLogo),
            QCLASS(Item_Cap_Earpiece_BlackLogo),
            QCLASS(Item_Cap_Earpiece_TanLogo),
            QCLASS(Item_Cap_Backwards_BlackLogo),
            QCLASS(Item_Cap_Backwards_TanLogo),
            QCLASS(Item_Helmet_Ballistic_DarkBlack),
            QCLASS(Item_Helmet_PilotHeli_Tan),
            QCLASS(Item_Hat_Boonie_RangerGreen),
            QCLASS(Item_Hat_Boonie_DesertMARPAT),
            QCLASS(Item_Hat_Boonie_Woodland),
            QCLASS(Item_Hat_Boonie_UCP)
        };
        weapons[] = {
            QCLASS(Cap_Headphones_BlackLogo),
            QCLASS(Cap_BlackLogo),
            QCLASS(Cap_TanLogo),
            QCLASS(Cap_Earpiece_BlackLogo),
            QCLASS(Cap_Earpiece_TanLogo),
            QCLASS(Cap_Backwards_BlackLogo),
            QCLASS(Cap_Backwards_TanLogo),
            QCLASS(Helmet_Ballistic_DarkBlack),
            QCLASS(Helmet_PilotHeli_Tan),
            QCLASS(Hat_Boonie_RangerGreen),
            QCLASS(Hat_Boonie_DesertMARPAT),
            QCLASS(Hat_Boonie_Woodland),
            QCLASS(Hat_Boonie_UCP)
        };
        requiredVersion = REQUIRED_VERSION;
        requiredAddons[] = {"tacs_main"};
        author = ECSTRING(main,Author);
        authors[] = {"Pomigit", "Jonpas", "Rory"};
        url = ECSTRING(main,URL);
        VERSION_CONFIG;
    };
};

#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"


Here is the file with my additions:

#include "script_component.hpp"

class CfgPatches {
    class ADDON {
        name = COMPONENT_NAME;
        units[] = {
            QCLASS(Item_Cap_Headphones_BlackLogo),
            QCLASS(Item_Cap_BlackLogo),
            QCLASS(Item_Cap_TanLogo),
			QCLASS(Item_Cap_CADPAT),
			QCLASS(Item_Cap_DarkBlackLogo),
			QCLASS(Item_Cap_GreenLogo),
			QCLASS(Item_Cap_MulticamBlackLogo),
            QCLASS(Item_Cap_Earpiece_BlackLogo),
            QCLASS(Item_Cap_Earpiece_TanLogo),
			QCLASS(Item_Cap_Earpiece_CADPAT),
			QCLASS(Item_Cap_Earpiece_DarkBlackLogo),
			QCLASS(Item_Cap_Earpiece_GreenLogo),
			QCLASS(Item_Cap_Earpiece_MulticamBlackLogo),
            QCLASS(Item_Cap_Backwards_BlackLogo),
            QCLASS(Item_Cap_Backwards_TanLogo),
			QCLASS(Item_Cap_Backwards_CADPAT),
			QCLASS(Item_Cap_Backwards_DarkBlackLogo),
			QCLASS(Item_Cap_Backwards_GreenLogo),
			QCLASS(Item_Cap_Backwards_MulticamBlackLogo),
            QCLASS(Item_Helmet_Ballistic_DarkBlack),
            QCLASS(Item_Helmet_PilotHeli_Tan),
			QCLASS(Item_Helmet_PilotHeli_DarkBlack),
            QCLASS(Item_Hat_Boonie_RangerGreen),
            QCLASS(Item_Hat_Boonie_DesertMARPAT),
            QCLASS(Item_Hat_Boonie_Woodland),
            QCLASS(Item_Hat_Boonie_UCP)
			QCLASS(Item_Hat_Boonie_CADPAT)
			QCLASS(Item_Hat_Boonie_DarkBlack)
			QCLASS(Item_Hat_Boonie_MulticamBlack)
        };
        weapons[] = {
            QCLASS(Item_Cap_Headphones_BlackLogo),
            QCLASS(Item_Cap_BlackLogo),
            QCLASS(Item_Cap_TanLogo),
			QCLASS(Item_Cap_CADPAT),
			QCLASS(Item_Cap_DarkBlackLogo),
			QCLASS(Item_Cap_GreenLogo),
			QCLASS(Item_Cap_MulticamBlackLogo),
            QCLASS(Item_Cap_Earpiece_BlackLogo),
            QCLASS(Item_Cap_Earpiece_TanLogo),
			QCLASS(Item_Cap_Earpiece_CADPAT),
			QCLASS(Item_Cap_Earpiece_DarkBlackLogo),
			QCLASS(Item_Cap_Earpiece_GreenLogo),
			QCLASS(Item_Cap_Earpiece_MulticamBlackLogo),
            QCLASS(Item_Cap_Backwards_BlackLogo),
            QCLASS(Item_Cap_Backwards_TanLogo),
			QCLASS(Item_Cap_Backwards_CADPAT),
			QCLASS(Item_Cap_Backwards_DarkBlackLogo),
			QCLASS(Item_Cap_Backwards_GreenLogo),
			QCLASS(Item_Cap_Backwards_MulticamBlackLogo),
            QCLASS(Item_Helmet_Ballistic_DarkBlack),
            QCLASS(Item_Helmet_PilotHeli_Tan),
			QCLASS(Item_Helmet_PilotHeli_DarkBlack),
            QCLASS(Item_Hat_Boonie_RangerGreen),
            QCLASS(Item_Hat_Boonie_DesertMARPAT),
            QCLASS(Item_Hat_Boonie_Woodland),
            QCLASS(Item_Hat_Boonie_UCP)
			QCLASS(Item_Hat_Boonie_CADPAT)
			QCLASS(Item_Hat_Boonie_DarkBlack)
			QCLASS(Item_Hat_Boonie_MulticamBlack)
        };
        requiredVersion = REQUIRED_VERSION;
        requiredAddons[] = {"tacs_main"};
        author = ECSTRING(main,Author);
        authors[] = {"Pomigit", "Jonpas", "Rory"};
        url = ECSTRING(main,URL);
        VERSION_CONFIG;
    };
};

#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

 

Edited by Eutyches
Issue Resolved

Share this post


Link to post
Share on other sites

UPDATE: After rereading the document yet again, I noticed that I was missing a few commas and that I had wrongly turned all entries under "weapons" into "Item_..." I suppose that I was looking at these documents for too long. However, I am still receiving the following specific error message:

 

Quote

File headgear\config.cpp, line 77: /CfgWeapons/: Missing '}'


What is this error?

Here is the cleaned file:
 

#include "script_component.hpp"

class CfgPatches {
    class ADDON {
        name = COMPONENT_NAME;
        units[] = {
            QCLASS(Item_Cap_Headphones_BlackLogo),
			QCLASS(Item_Cap_BlackLogo),
			QCLASS(Item_Cap_TanLogo),
			QCLASS(Item_Cap_CADPAT),
			QCLASS(Item_Cap_DarkBlackLogo),
			QCLASS(Item_Cap_GreenLogo),
			QCLASS(Item_Cap_MulticamBlackLogo),
			QCLASS(Item_Cap_Earpiece_BlackLogo),
			QCLASS(Item_Cap_Earpiece_TanLogo),
			QCLASS(Item_Cap_Earpiece_CADPAT),
			QCLASS(Item_Cap_Earpiece_DarkBlackLogo),
			QCLASS(Item_Cap_Earpiece_GreenLogo),
			QCLASS(Item_Cap_Earpiece_MulticamBlackLogo),
			QCLASS(Item_Cap_Backwards_BlackLogo),
			QCLASS(Item_Cap_Backwards_TanLogo),
			QCLASS(Item_Cap_Backwards_CADPAT),
			QCLASS(Item_Cap_Backwards_DarkBlackLogo),
			QCLASS(Item_Cap_Backwards_GreenLogo),
			QCLASS(Item_Cap_Backwards_MulticamBlackLogo),
			QCLASS(Item_Helmet_Ballistic_DarkBlack),
			QCLASS(Item_Helmet_PilotHeli_Tan),
			QCLASS(Item_Helmet_PilotHeli_DarkBlack),
			QCLASS(Item_Hat_Boonie_RangerGreen),
			QCLASS(Item_Hat_Boonie_DesertMARPAT),
			QCLASS(Item_Hat_Boonie_Woodland),
			QCLASS(Item_Hat_Boonie_UCP),
			QCLASS(Item_Hat_Boonie_CADPAT),
			QCLASS(Item_Hat_Boonie_DarkBlack),
			QCLASS(Item_Hat_Boonie_MulticamBlack)
        };
        weapons[] = {
            QCLASS(Cap_Headphones_BlackLogo),
			QCLASS(Cap_BlackLogo),
			QCLASS(Cap_TanLogo),
			QCLASS(Cap_CADPAT),
			QCLASS(Cap_DarkBlackLogo),
			QCLASS(Cap_GreenLogo),
			QCLASS(Cap_MulticamBlackLogo),
			QCLASS(Cap_Earpiece_BlackLogo),
			QCLASS(Cap_Earpiece_TanLogo),
			QCLASS(Cap_Earpiece_CADPAT),
			QCLASS(Cap_Earpiece_DarkBlackLogo),
			QCLASS(Cap_Earpiece_GreenLogo),
			QCLASS(Cap_Earpiece_MulticamBlackLogo),
			QCLASS(Cap_Backwards_BlackLogo),
			QCLASS(Cap_Backwards_TanLogo),
			QCLASS(Cap_Backwards_CADPAT),
			QCLASS(Cap_Backwards_DarkBlackLogo),
			QCLASS(Cap_Backwards_GreenLogo),
			QCLASS(Cap_Backwards_MulticamBlackLogo),
			QCLASS(Helmet_Ballistic_DarkBlack),
			QCLASS(Helmet_PilotHeli_Tan),
			QCLASS(Helmet_PilotHeli_DarkBlack),
			QCLASS(Hat_Boonie_RangerGreen),
			QCLASS(Hat_Boonie_DesertMARPAT),
			QCLASS(Hat_Boonie_Woodland),
			QCLASS(Hat_Boonie_UCP),
			QCLASS(Hat_Boonie_CADPAT),
			QCLASS(Hat_Boonie_DarkBlack),
			QCLASS(Hat_Boonie_MulticamBlack)
        };
        requiredVersion = REQUIRED_VERSION;
        requiredAddons[] = {"tacs_main"};
        author = ECSTRING(main,Author);
        authors[] = {"Pomigit", "Jonpas", "Rory"};
        url = ECSTRING(main,URL);
        VERSION_CONFIG;
    };
};

#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

 

Share this post


Link to post
Share on other sites

What's on line 77? Or around there?

 

In my experience, I don't use commas in configs unless it's in an array. I can't remember the error that I had before, but it went away when I removed the commas from my author line.

  • Thanks 1

Share this post


Link to post
Share on other sites
10 hours ago, BadHabitz said:

What's on line 77? Or around there?

 

In my experience, I don't use commas in configs unless it's in an array. I can't remember the error that I had before, but it went away when I removed the commas from my author line.

Thanks for the response!

Believe it or not, it was actually as easy as adding a "}" to the end of Line 77.

ISSUE RESOLVED.

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

×