Jump to content
Sign in to follow this  
gepanzert-faust

"C" encountered instead of "{" Config Error

Recommended Posts

Hey, could somebody try and point out my error with this config?

I have simply tried to create a new 12.7 mm high-explosive round for the Lynx sniper rifle.

I've copied one of the other 12.7mm rounds as a base, modified it, created a new magazine and finally used "class CfgWeapons" to try and update the Lynx to accept the new magazine.

The config still contains irrelevant parameters regarding the actual new ammo, I'll remove those later, but for now I can't even get the mod to load.

I can't get rid of the "C" encountered instead of "{" error on line 47?

Everything looks fine as to me - although I admit I'm a "still learning" type of config noob :D

class CfgPatches {
class HE_sniper_round {
	units[] = {};
	weapons[] = {"srifle_GM6_F", "srifle_GM6_SOS_F"};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Weapons_F"};
};

};

class CfgAmmo {

       class B_127x108_Ball;	

class B_127x108_HE : B_127x108_Ball {
	hit = 60;
               explosive = 0.6;
	indirectHit = 6;
	indirectHitRange = 1;
	caliber = 3.6;
	deflecting = 10;
	typicalSpeed = 1060;
	airFriction = -0.00036;
	visibleFire = 10;	// how much is visible when this weapon is fired
	audibleFire = 15;
	cost = 15;

	class CamShakeExplode {
		power = (20^0.5);
		duration = "((round (20^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = ((20^0.5)*3);
	};

	class CamShakeHit {
		power = 20;
		duration = "((round (20^0.25))*0.2 max 0.2)";
		frequency = 20;
		distance = 1;
};

};


class CfgMagazines {
       class 5Rnd_127x108_Mag

        class 5Rnd_127x108_HE_Mag : 5Rnd_127x108_Mag {
	author = "$STR_A3_Bohemia_Interactive";
	picture = "\A3\weapons_f\data\UI\M_5rnd_127x108_CA.paa";
	displayName = "HE Round Mag";
	initSpeed = 1060;
	ammo = "B_127x108_HE";
	descriptionShort = "$STR_A3_CfgMagazines_5Rnd_127x108_APDS_Mag1";


};
};

class CfgWeapons {
class Rifle_Long_Base_F

class GM6_base_F : Rifle_Long_Base_F {

magazines[] = {"5Rnd_127x108_Mag", "5Rnd_127x108_APDS_Mag", "5Rnd_127x108_HE_Mag"};

};
};

Edited by Gepanzert-Faust

Share this post


Link to post
Share on other sites

You need to close class CfgAmmo tree with "};" - You've got one closing CamShakeHit, one closing B_127x108_HE, but for CfgAmmo it's missing, making preprocessor mad.

BTW: it's ArmA: CWA AKA Operation Flashpoint forum - Arma 3 forums are up! ;)

Share this post


Link to post
Share on other sites

Moved to the correct area of the forums - please try to post in the correct location - Thanks

Share this post


Link to post
Share on other sites
Hey, could somebody try and point out my error with this config?

I have simply tried to create a new 12.7 mm high-explosive round for the Lynx sniper rifle.

I've copied one of the other 12.7mm rounds as a base, modified it, created a new magazine and finally used "class CfgWeapons" to try and update the Lynx to accept the new magazine.

The config still contains irrelevant parameters regarding the actual new ammo, I'll remove those later, but for now I can't even get the mod to load.

I can't get rid of the "C" encountered instead of "{" error on line 47?

Everything looks fine as to me - although I admit I'm a "still learning" type of config noob :D

class CfgPatches {
class HE_sniper_round {
	units[] = {};
	weapons[] = {"srifle_GM6_F", "srifle_GM6_SOS_F"};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Weapons_F"};
};

};

class CfgAmmo {

       class B_127x108_Ball;	

class B_127x108_HE : B_127x108_Ball {
	hit = 60;
               explosive = 0.6;
	indirectHit = 6;
	indirectHitRange = 1;
	caliber = 3.6;
	deflecting = 10;
	typicalSpeed = 1060;
	airFriction = -0.00036;
	visibleFire = 10;	// how much is visible when this weapon is fired
	audibleFire = 15;
	cost = 15;

	class CamShakeExplode {
		power = (20^0.5);
		duration = "((round (20^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = ((20^0.5)*3);
	};

	class CamShakeHit {
		power = 20;
		duration = "((round (20^0.25))*0.2 max 0.2)";
		frequency = 20;
		distance = 1;
};

};


class CfgMagazines {
       class 5Rnd_127x108_Mag

        class 5Rnd_127x108_HE_Mag : 5Rnd_127x108_Mag {
	author = "$STR_A3_Bohemia_Interactive";
	picture = "\A3\weapons_f\data\UI\M_5rnd_127x108_CA.paa";
	displayName = "HE Round Mag";
	initSpeed = 1060;
	ammo = "B_127x108_HE";
	descriptionShort = "$STR_A3_CfgMagazines_5Rnd_127x108_APDS_Mag1";


};
};

class CfgWeapons {
class Rifle_Long_Base_F

class GM6_base_F : Rifle_Long_Base_F {

magazines[] = {"5Rnd_127x108_Mag", "5Rnd_127x108_APDS_Mag", "5Rnd_127x108_HE_Mag"};

};
};

Every base class you include needs an semicolom at the end

class Rifle_Long_Base_F needs to be class Rifle_Long_Base_F;

Share this post


Link to post
Share on other sites

If I may, I recommend to write curly brackets on separate lines, and to indent the properties listed between them, as seen below. It helps a lot with reading the code and finding any errors. Btw, if you use a localization key ($STR_A3…), you have to write it without quotation marks, else the string isn't transformed into its actual content in the game. And finally, values of the properties in the form of expressions won't work written in the way you used in your config. Please try adding __EVAL in front of the expression, as seen in the code below. This command should make the expression work.

class CfgPatches
{
class HE_sniper_round
{
	units[] = {};
	weapons[] = {"srifle_GM6_F", "srifle_GM6_SOS_F"};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Weapons_F"};
};
};

class CfgAmmo
{
class B_127x108_Ball;	
class B_127x108_HE: B_127x108_Ball
{
	hit = 60;
	explosive = 0.6;
	indirectHit = 6;
	indirectHitRange = 1;
	caliber = 3.6;
	deflecting = 10;
	typicalSpeed = 1060;
	airFriction = -0.00036;
	visibleFire = 10;	// how much is visible when this weapon is fired
	audibleFire = 15;
	cost = 15;

	class CamShakeExplode
	{
		power = __EVAL(20^0.5);
		duration = __EVAL((round (20^0.5))*0.2 max 0.2);
		frequency = 20;
		distance = __EVAL((20^0.5)*3);
	};

	class CamShakeHit
	{
		power = 20;
		duration = __EVAL((round (20^0.25))*0.2 max 0.2);
		frequency = 20;
		distance = 1;
	};
};
};


class CfgMagazines
{
class 5Rnd_127x108_Mag
class 5Rnd_127x108_HE_Mag: 5Rnd_127x108_Mag
{
	author = $STR_A3_Bohemia_Interactive;
	picture = "\A3\weapons_f\data\UI\M_5rnd_127x108_CA.paa";
	displayName = "HE Round Mag";
	initSpeed = 1060;
	ammo = "B_127x108_HE";
	descriptionShort = $STR_A3_CfgMagazines_5Rnd_127x108_APDS_Mag1;
};
};

class CfgWeapons
{
class Rifle_Long_Base_F
class GM6_base_F: Rifle_Long_Base_F
{
	magazines[] = {"5Rnd_127x108_Mag", "5Rnd_127x108_APDS_Mag", "5Rnd_127x108_HE_Mag"};
};
};

Share this post


Link to post
Share on other sites

Hi guys, I am new to the forum and I didn't find a topic on my problem so there he is...

I tried to remove ace addons and I fuck up my file... Now its say: line 0:'.raP':" encountered instead of '='

There is the line 0:

 raP       ¯   version 4    EditorData ð  addons A3_Characters_F  A3_Air_F_Heli_Light_01  A3_Characters_F_Exp  A3_Weapons_F_Exp_Rifles_SPAR_01  cba_jr  A3_Weapons_F_Acc  A3_Weapons_F_Mark_Acc  A3_Weapons_F  A3_Weapons_F_Exp  A3_Characters_F_Exp_Headgear  A3_Weapons_F_Items  A3_Characters_F_Exp_Vests  A3_Weapons_F_Exp_Rifles_SPAR_02  A3_Weapons_F_Exp_Rifles_SPAR_03  A3_Modules_F_Curator_Flares  Ryanzombies  A3_Modules_F_Intel  ryanzombiesfunctions  A3_Ui_F  A3_Structures_F_Civ_Camping  A3_Supplies_F_Heli_CargoNets  A3_Structures_F_Civ_Garbage  A3_Structures_F_EPB_Civ_Camping  A3_Structures_F_EPB_Items_Military  A3_Structures_F_Items_Vessels  A3_Armor_F_EPC_MBT_01  AddonsMetaData  randomSeed sÒ  ScenarioData Å   Mission ä  ¯   moveGridStep   €?angleGridStep ’
†>scaleGridStep   €?autoGroupingDist    Atoggles   ItemIDProvider Œ   MarkerIDProvider Ÿ   Camera ²     nextID ¤   Ÿ   nextID   ²   pos j°ÊE·A?Cl†Fdir ÕP€>D.o¿‚>up àý'??¶>~@*?aside ‚>6?

 

 

If you have time can you help me removing ace depend

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  

×