Jump to content
FlashCrack

[Solved] '{' encountered instead of '='

Recommended Posts

Hey everyone, whilst working on my custom re-skins of the RHS mods I ran into a bit of a problem.

 

The issue is the following:

223ea506d0d97f1a522561d32cf18ae2.png

 

Now I've tried fixing it and I know ArmA sometimes doesn't really properly specify the line but I can't seem to find the problem, it might be because I'm too tired, but if anyone can have a brief look at it I'd be thankful.

 

Here are the contents of the config.cpp

Quote

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

class CfgVehicles 
{

    class B_Soldier_F;
    class FPZ_Unarmed: B_Soldier_F
    {
        author="FlashCrack";
        _generalMacro="SoldierGB";
        dlc="RHS_SAF";
        scope=2;
        side=2;
        role="Unarmed";
        scopeCurator=2;
        displayName="$STR_FPZ_Unarmed";
        identityTypes[]=
        {
            "LanguageGRE_F",
            "Head_Euro"
        };
        genericNames="TestMen";
        model="\rhssaf\addons\rhssaf_m_uniform_m10\rhssaf_uniform_m10_summer";
        uniformClass="FPZ_M10_Latvian_Summer";
        hiddenSelections[]=
        {
            "Camo"
        };
        hiddenSelectionsTextures[]=
        {
            "FPZCustomUniforms\data\m10_latvian_summer_co.paa"
        };
        
    };

};

class CfgWeapons
{
    
    {
    class ItemCore;
    class UniformItem;
    class Uniform_Base: ItemCore
    class VestItem;
    class Vest_Camo_Base: ItemCore
    class HeadgearItem;
    };
    class FPZ_M10_Latvian_Summer: Uniform_Base
    {
        scope=2;
        author="FlashCrack & RHS";
        displayName="M10 (Latvia/Summer)";
        model="\rhssaf\addons\rhssaf_m_uniform_m10\rhssaf_uniform_m10_summer";
        class ItemInfo: UniformItem
        {
            uniformClass="FPZ_Unarmed";
            containerClass="Supply30";
            mass=50;
        
        
        };
    
    
    };
    
    class FPZ_LWH_Latvian: ItemCore
    {
        scope=2;
        weaponPoolAvailable=1;
        author="FlashCrack & RHS";
        displayName="LWH (Latvia)";
        model="\rhsusf\addons\rhsusf_infantry\gear\head\lwh_wd";
        hiddenSelections[]=
        {
            "camo",
            "camo2"
        };
        hiddenSelectionsTextures[]=
        {
            "\FPZCustomUniforms\data\lwh_latvian_co.paa"
        };
        class ItemInfo: HeadgearItem
        {
            mass=42;
            uniformModel="\rhsusf\addons\rhsusf_infantry\gear\head\lwh_wd";
            hiddenSelections[]=
            {
                "camo",
                "camo2"
            };
            allowedSlots[]={801,901,701,605};
            modelSides[]={6};
            class HitpointsProtectionInfo
            {
                class Head
                {
                    hitpointName="HitHead";
                    armor=6;
                    passThrough=0.5;
                
                };
            
            };
        
        };
    
    };
    
    class FPZ_MD12_Latvian: Vest_Camo_Base
    {
        author="FlashCrack & RHS";
        scope=2;
        weaponPoolAvailable=1;
        allowedSlots[]={901};
        displayName="MD12 (Latvia)";
        model="\rhssaf\addons\rhssaf_m_vest_m12\rhssaf_md12";
        hiddenSelections[]=
        {
            "camo"
        };
        hiddenSelectionsTextures[]=
        {
            "\FPZCustomUniforms\data\md12_latvian"
        };
        class ItemInfo: VestItem
        {
            hiddenSelections[]=
            {
                "camo"
            };
            uniformModel="\rhssaf\addons\rhssaf_m_vest_m12\rhssaf_md12";
            containerClass="Supply120";
            mass=50;
            class HitpointsProtectionInfo
            {
                class Neck
                {
                    HitpointName="HitNeck";
                    armor=0;
                    PassThrough=1;
                };
                class Chest
                {
                    HitpointName="HitChest";
                    armor=6;
                    PassThrough=0.30000002;
                };
                class Diaphragm
                {
                    HitpointName="HitDiaphragm";
                    armor=6;
                    PassThrough=0.30000002;
                };
                class Abdomen
                {
                    hitpointName="HitAbdomen";
                    armor=6;
                    passThrough=0.30000002;
                };
                class Body
                {
                    hitpointName="HitBody";
                    passThrough=0.60000002;
                };
            };
        };
    }; 
    
};

 

Share this post


Link to post
Share on other sites

I'm not addon maker but this bit looks strange, should probably remove the { }:

 

    {
    class ItemCore;
    class UniformItem;
    class Uniform_Base: ItemCore
    class VestItem;
    class Vest_Camo_Base: ItemCore
    class HeadgearItem;
    };

 

Edited by gc8

Share this post


Link to post
Share on other sites
5 minutes ago, gc8 said:

I'm not addon maker but this bit looks strange, should probably remove the { }:

 


    {
    class ItemCore;
    class UniformItem;
    class Uniform_Base: ItemCore
    class VestItem;
    class Vest_Camo_Base: ItemCore
    class HeadgearItem;
    };

 

 

I know it is weird, but when I do remove the brackets I get this error:

aa1a8b189e0299238874ffcf727b543a.png

 

I just tested it without again, and since I put the brackets on it changed to a different error, so I really don't know what is wrong, I imagine the error might be somewhere else as I turned that part of the config upside down, re-written it, used a template and looked at other mods and how they did it.

Share this post


Link to post
Share on other sites

This is just a guess but maybe you also need to remove the inheriting which doesn't really make sense.

 

this:

    class ItemCore;
    class UniformItem;
    class Uniform_Base: ItemCore
    class VestItem;
    class Vest_Camo_Base: ItemCore
    class HeadgearItem;

 

to this:

 

    class ItemCore;
    class UniformItem;
    class Uniform_Base;
    class VestItem;
    class Vest_Camo_Base;
    class HeadgearItem;

 

Share this post


Link to post
Share on other sites
7 minutes ago, gc8 said:

-snipped-

 

 

It actually worked! Finally, it works, thank you!

 

I saw the inheriting work on another mod which I used as a template for the config so I don't know why it shouldn't work but oh well it works now.

 

P.S. - Thank you for such a fast reply.

Share this post


Link to post
Share on other sites
4 minutes ago, FlashCrack said:

I saw the inheriting work on another mod which I used as a template for the config so I don't know why it shouldn't work but oh well it works now.

 

I don't know if inheriting is supposed to work like that, maybe the problem was just that semicolons were missing.

 

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

×