Jump to content
Sign in to follow this  
Sakai

No entry "cfgweapon.weaponclassname"

Recommended Posts

Hello! I have a strange problem with my config.cpp, I have added a Eotech sight to the fn fal however there is one problem which sends me directly to the config.cpp about the classname, firstly I thought its something about it e.g. too short or too long but it seems differently.

Untitled.jpg

The classname "fac_falpara_eotech" is defined in the config, works fine in oxygen and model.cfg works fine with it as well, only one problem here is that for some reason the game does not "approve" it, well either way here is the config.cpp:

The classname needs fix is the "fac_falpara_eotech"

class CfgPatches
{
 class fac_falpar
 {
   units[] = {};
   weapons[] = {};
   requiredVersion = 1.6;
   requiredAddons[] = {"CAWeapons","CAWeapons_e"};
 };
};

class Single;
class FullAuto;
class GrenadeLauncher;

class CfgWeapons
{
 class GrenadeLauncher;
 class FN_FAL;
 class fac_falpar : FN_FAL
 {
   value = 0;
   model = "\fac_falpar\vil_falpara";
   optics = true;
   displayName = "FN FAL Para";
   picture = "\fac_falpar\ico\ico_fal.paa";
   UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";
   magazines[] = {"20Rnd_762x51_FNFAL"};
   weaponInfoType = "RscWeaponZeroing";
   discreteDistance[] = {200, 300, 400, 500, 600};
   discreteDistanceInitIndex = 1;
   modes[] = {"Single", "FullAuto"};
   class Single : Single
   {
     reloadTime = 0.09;
     //dispersion = 0.0017;
     minRange = 2;
     minRangeProbab = 0.1;
     midRange = 250;
     midRangeProbab = 0.75;
     maxRange = 400;
     maxRangeProbab = 0.05;
   };
   class FullAuto : Single
   {
     displayName = $STR_DN_MODE_FULLAUTO;
     autoFire = true;
     reloadTime = 0.09;
     //dispersion = 0.0017;
     recoil = "recoil_auto_primary_6outof10";
     recoilProne = "recoil_auto_primary_prone_5outof10";
     dispersion = 0.005;
     aiRateOfFire = 12;
     minRange = 0;
     minRangeProbab = 0.3;
     midRange = 80;
     midRangeProbab = 0.7;
     maxRange = 200;
     maxRangeProbab = 0.05;
   };
   class Library
   {
     libTextDesc = $STR_EP1_LIB_FN_FAL;
   };
   class Armory
   {
     author = $STR_AUTHOR_VILAS;
   };
 };
 class fac_falpara_m203 : FN_FAL
 {
   value = 0;
   model = "\fac_falpar\vil_falpara_m203";
   optics = true;
   displayName = "FN FAL Para M203";
   picture = "\fac_falpar\ico\ico_fal.paa";
   UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";
   magazines[] = {"20Rnd_762x51_FNFAL"};
   weaponInfoType = "RscWeaponZeroing";
   discreteDistance[] = {200, 300, 400, 500, 600};
   discreteDistanceInitIndex = 1;
   muzzles[] = {"this", "fac_M203Muzzle"};
   modes[] = {"Single", "FullAuto"};
   class Single : Single
   {
     reloadTime = 0.09;
     //dispersion = 0.0017;
     minRange = 2;
     minRangeProbab = 0.1;
     midRange = 250;
     midRangeProbab = 0.75;
     maxRange = 400;
     maxRangeProbab = 0.05;
   };
   class FullAuto : Single
   {
     displayName = $STR_DN_MODE_FULLAUTO;
     autoFire = true;
     reloadTime = 0.09;
     //dispersion = 0.0017;
     recoil = "recoil_auto_primary_6outof10";
     recoilProne = "recoil_auto_primary_prone_5outof10";
     dispersion = 0.005;
     aiRateOfFire = 12;
     minRange = 0;
     minRangeProbab = 0.3;
     midRange = 80;
     midRangeProbab = 0.7;
     maxRange = 200;
     maxRangeProbab = 0.05;
   };
   class fac_M203Muzzle: GrenadeLauncher
   {
     displayName = "M203";
     magazines[] = {"1Rnd_HE_M203","FlareWhite_M203","FlareGreen_M203","FlareRed_M203","FlareYellow_M203","1Rnd_Smoke_M203","1Rnd_SmokeRed_M203","1Rnd_SmokeGreen_M203","1Rnd_SmokeYellow_M203"};
     sound[] = {"\Ca\sounds\Weapons\cannon\grenadelauncher_1",0.1,1,400};
     reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316228,1,20};
     magazineReloadTime = 0;
     reloadTime = 0.1;
     optics = 1;
     modelOptics = "-";
     cameraDir = "GL look";
     memoryPointCamera = "GL eye";
     opticsZoomMin = 0.25;
     opticsZoomMax = 1.1;
     opticsZoomInit = 0.5;
   };
class fac_falpara_eotech : FN_FAL
 {
   value = 0;
   model = "\fac_falpar\vil_falparaeot";
   optics = true;
   displayName = "FN FAL Para Eotech";
   picture = "\fac_falpar\ico\ico_fal.paa";
   UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";
   magazines[] = {"20Rnd_762x51_FNFAL"};
   weaponInfoType = "RscWeaponZeroing";
   discreteDistance[] = {200, 300, 400, 500, 600};
   discreteDistanceInitIndex = 1;
   modes[] = {"Single", "FullAuto"};
   class Single : Single
   {
     reloadTime = 0.09;
     //dispersion = 0.0017;
     minRange = 2;
     minRangeProbab = 0.1;
     midRange = 250;
     midRangeProbab = 0.75;
     maxRange = 400;
     maxRangeProbab = 0.05;
   };
   class FullAuto : Single
   {
     displayName = $STR_DN_MODE_FULLAUTO;
     autoFire = true;
     reloadTime = 0.09;
     //dispersion = 0.0017;
     recoil = "recoil_auto_primary_6outof10";
     recoilProne = "recoil_auto_primary_prone_5outof10";
     dispersion = 0.005;
     aiRateOfFire = 12;
     minRange = 0;
     minRangeProbab = 0.3;
     midRange = 80;
     midRangeProbab = 0.7;
     maxRange = 200;
     maxRangeProbab = 0.05;
   };
   class Library
   {
     libTextDesc = $STR_EP1_LIB_FN_FAL;
   };
   class Armory
   {
     author = $STR_AUTHOR_VILAS;
   };
 };
};
};

Could anyone help me out please? Other classnames/weapon's work without a problem its only the eotech one.

Share this post


Link to post
Share on other sites

Easy one

 class fac_falpara_m203 : FN_FAL
 {
   value = 0;
   model = "\fac_falpar\vil_falpara_m203";
   optics = true;
   displayName = "FN FAL Para M203";
   picture = "\fac_falpar\ico\ico_fal.paa";
   UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";
   magazines[] = {"20Rnd_762x51_FNFAL"};
   weaponInfoType = "RscWeaponZeroing";
   discreteDistance[] = {200, 300, 400, 500, 600};
   discreteDistanceInitIndex = 1;
   muzzles[] = {"this", "fac_M203Muzzle"};
   modes[] = {"Single", "FullAuto"};
   class Single : Single
   {
     reloadTime = 0.09;
     //dispersion = 0.0017;
     minRange = 2;
     minRangeProbab = 0.1;
     midRange = 250;
     midRangeProbab = 0.75;
     maxRange = 400;
     maxRangeProbab = 0.05;
   };
   class FullAuto : Single
   {
     displayName = $STR_DN_MODE_FULLAUTO;
     autoFire = true;
     reloadTime = 0.09;
     //dispersion = 0.0017;
     recoil = "recoil_auto_primary_6outof10";
     recoilProne = "recoil_auto_primary_prone_5outof10";
     dispersion = 0.005;
     aiRateOfFire = 12;
     minRange = 0;
     minRangeProbab = 0.3;
     midRange = 80;
     midRangeProbab = 0.7;
     maxRange = 200;
     maxRangeProbab = 0.05;
   };
   class fac_M203Muzzle: GrenadeLauncher
   {
     displayName = "M203";
     magazines[] = {"1Rnd_HE_M203","FlareWhite_M203","FlareGreen_M203","FlareRed_M203","FlareYellow_M203","1Rnd_Smoke_M203","1Rnd_SmokeRed_M203","1Rnd_SmokeGreen_M203","1Rnd_SmokeYellow_M203"};
     sound[] = {"\Ca\sounds\Weapons\cannon\grenadelauncher_1",0.1,1,400};
     reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316228,1,20};
     magazineReloadTime = 0;
     reloadTime = 0.1;
     optics = 1;
     modelOptics = "-";
     cameraDir = "GL look";
     memoryPointCamera = "GL eye";
     opticsZoomMin = 0.25;
     opticsZoomMax = 1.1;
     opticsZoomInit = 0.5;
   };
[color="#FF0000"]};[/color]
class fac_falpara_eotech : FN_FAL
 {
   value = 0;
   model = "\fac_falpar\vil_falparaeot";
   optics = true;
   displayName = "FN FAL Para Eotech";
   picture = "\fac_falpar\ico\ico_fal.paa";
   UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";
   magazines[] = {"20Rnd_762x51_FNFAL"};
   weaponInfoType = "RscWeaponZeroing";
   discreteDistance[] = {200, 300, 400, 500, 600};
   discreteDistanceInitIndex = 1;
   modes[] = {"Single", "FullAuto"};
   class Single : Single
   {
     reloadTime = 0.09;
     //dispersion = 0.0017;
     minRange = 2;
     minRangeProbab = 0.1;
     midRange = 250;
     midRangeProbab = 0.75;
     maxRange = 400;
     maxRangeProbab = 0.05;
   };
   class FullAuto : Single
   {
     displayName = $STR_DN_MODE_FULLAUTO;
     autoFire = true;
     reloadTime = 0.09;
     //dispersion = 0.0017;
     recoil = "recoil_auto_primary_6outof10";
     recoilProne = "recoil_auto_primary_prone_5outof10";
     dispersion = 0.005;
     aiRateOfFire = 12;
     minRange = 0;
     minRangeProbab = 0.3;
     midRange = 80;
     midRangeProbab = 0.7;
     maxRange = 200;
     maxRangeProbab = 0.05;
   };
   class Library
   {
     libTextDesc = $STR_EP1_LIB_FN_FAL;
   };
   class Armory
   {
     author = $STR_AUTHOR_VILAS;
   };
 };

You misplaced a };

Share this post


Link to post
Share on other sites

Like hell I would of find that one >.<

Thank you that got it!

Share this post


Link to post
Share on other sites

Use a proper editor like NotePad++

Your simply missing an ending }; from class fac_falpara_m203

NotePad++ would for example show you that

Share this post


Link to post
Share on other sites

You guys didnt read what I posted back then I guess as I already said I use notepad++ and it shown it was closed.

Share this post


Link to post
Share on other sites

........... !?

Not possible, I found your problem using NotePad++ (before finding Kerc Kasha had answered)

You must be using it incorrectly.

Share this post


Link to post
Share on other sites
You guys didnt read what I posted back then I guess as I already said I use notepad++ and it shown it was closed.

I think it was showing as closed because you had an extra }; right down the bottom, so it was technically closed (hence why you could even start the game) just in the wrong place

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  

×