Jump to content

Photo
- - - - -

Problem with config.cpp. Need help.


  • Please log in to reply
10 replies to this topic

#1 n45c4r

n45c4r

    Private First Class

  • Members
  • 14 posts

Posted 08 April 2012 - 10:35 AM

I try to make a config, but when i run Arma error message apppear. I hope somebody can help me with this problem
Config file
#define true 1
#define false 0

#define VSoft 0
#define VArmor 1
#define VAir 2

#define private 0
#define protected 1
#define public 2

#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define ReadAndWrite 0
#define ReadAndCreate 1
#define ReadOnly 2
#define ReadOnlyVerified 3


class CfgPatches }
	class pal_inf_specops }
		units[] = {"pal_spec_comotd", "pal_spec_strelok", "pal_spec_mgunner", "pal_spec_sabot", "pal_spec_sniper"};
		weapons[] = {};
		requiredVersion = 1.60;
		requiredAddons[] = {"CACharacters", "CACharacters2", CA_E, "CACharacters_E_Head", "CACharacters_E"};
	};
	
	

};

class CfgVehicleClasses }
	class PAL_inf_specops }
		displayName = "----------";
	};
	

};



class CfgVehicles }
	class Man;	// External class reference
	
	class CAManBase;	// External class reference
	
	class SoldierEB;	// External class reference
	
	class SoldierWB;	// External class reference
	
	class SoldierGB;	// External class reference
	
	class Civilian;	// External class reference
	
	class RUS_Soldier1;	// External class reference
	
	class RUS_Soldier_TL;	// External class reference
	
	class RUS_Soldier_Sab;
	
	class pal_spec_comotd : RUS_Soldier_TL }
		vehicleClass = "PAL_inf_specops";
		faction = "Pal";
		scope = public;
		displayName = "Team Leader";
		Picture = "\Ca\characters\data\Ico\i_sleader_CA.paa";
		Icon = "\Ca\characters2\data\icon\i_officer_CA.paa";
		
		TextPlural = "$STR_DN_officers";
		TextSingular = "$STR_DN_officer";
		nameSound = "veh_officer";
		accuracy = 3.6;	// accuracy needed to recognize type of this target
		sensitivity = 3.4;	// sensor sensitivity
		cost = 500000;
		enableGPS = 1;
		model = "\pal\inf specops\Specnaz";
		identityTypes[] = {"Head_CDF","CDF_Glasses","Language_EN_EP1"};
		hiddenSelectionsTextures[] = {"\pal\inf specops\partizan_vest_co.paa"};
		backpack = "";
		weapons[] = {"M4A1_HWS_GL", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "ItemGPS", "Binocular_Vector", "M9SD"};
		magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenade_West", "HandGrenade_West", "Binocular", "SmokeShellRed", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD"};
		respawnWeapons[] = {"M4A1_HWS_GL", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "ItemGPS", "Binocular_Vector", "M9SD"};
		respawnMagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenade_West", "HandGrenade_West", "Binocular", "SmokeShellRed", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD"};
	};
	
	class pal_spec_strelok : RUS_Soldier_TL }
		vehicleClass = "PAL_inf_specops";
		faction = "Pal";
		scope = public;
		accuracy = 3.9;	// accuracy needed to recognize type of this target
		displayName = "Rifleman";
		model = "\pal\inf specops\Specnaz";
		identityTypes[] = {"Head_CDF","CDF_Glasses","Language_EN_EP1"};
		hiddenSelectionsTextures[] = {"\pal\inf specops\partizan_vest_co.paa"};
		weapons[] = {"M4A1_Aim", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
		magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenade_West", "HandGrenade_West", "HandGrenade_West", "HandGrenade_West"};
		respawnWeapons[] ={"M4A1_Aim", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"}; 
		respawnMagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenade_West", "HandGrenade_West", "HandGrenade_West", "HandGrenade_West"};
	};
	
	class pal_spec_mgunner : RUS_Soldier1 }
		vehicleClass = "PAL_inf_specops";
		faction = "Pal";
		scope = public;
		accuracy = 3.9;	// accuracy needed to recognize type of this target
		displayName = "Machinegunner";
		model = "\pal\inf specops\Specnaz";
		identityTypes[] = {"Head_CDF","CDF_Glasses","Language_EN_EP1"};
		hiddenSelectionsTextures[] = {"\pal\inf specops\partizan_vest_co.paa"};
		weapons[] = {"M249_m145_EP1", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
		magazines[] = {"200Rnd_556x45_M249", "200Rnd_556x45_M249", "200Rnd_556x45_M249", "200Rnd_556x45_M249", "HandGrenade_West", "HandGrenade_West"};
		respawnWeapons[] = {"M249_m145_EP1", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
		respawnMagazines[] = {"200Rnd_556x45_M249", "200Rnd_556x45_M249", "200Rnd_556x45_M249", "200Rnd_556x45_M249", "HandGrenade_West", "HandGrenade_West"};
	};
	
	class pal_spec_sabot : RUS_Soldier_Sab }
		vehicleClass = "PAL_inf_specops";
		faction = "Pal";
		scope = public;
		accuracy = 3.9;	// accuracy needed to recognize type of this target
		displayName = "Saboteur";
		model = "\pal\inf specops\Specnaz";
		identityTypes[] = {"Head_CDF","CDF_Glasses","Language_EN_EP1"};
		hiddenSelectionsTextures[] = {"\pal\inf specops\partizan_co.paa"};
		weapons[] = {"M4A1_AIM_SD_camo", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
		magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "TimeBomb", "TimeBomb", "TimeBomb"};
		respawnWeapons[] = {"M4A1_AIM_SD_camo", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
		respawnMagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "TimeBomb", "TimeBomb", "TimeBomb"};
	};
	
	class pal_spec_sniper : RUS_Soldier1 }
		vehicleClass = "PAL_inf_specops";
		faction = "Pal";
		scope = public;
		accuracy = 3.9;	// accuracy needed to recognize type of this target
		displayName = "Sniper";
		model = "\pal\inf specops\Specnaz";
		identityTypes[] = {"Head_CDF","CDF_Glasses","Language_EN_EP1"};
		hiddenSelectionsTextures[] = {"\pal\inf specops\partizan_co.paa"};
		weapons[] = {"M110_TWS_EP1", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
		magazines[] = {"20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR"};
		respawnWeapons[] = {"M110_TWS_EP1", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
		respawnMagazines[] = {"20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR"};
	};
};


#2 W0lle

W0lle

    Lieutenant Colonel

  • Members
  • 8235 posts

Posted 08 April 2012 - 02:03 PM

Absolutely no surprise that there are errors.

class CfgPatches }
    class pal_inf_specops }
        units[] = {"pal_spec_comotd", "pal_spec_strelok", "pal_spec_mgunner", "pal_spec_sabot", "pal_spec_sniper"};
        weapons[] = {};
        requiredVersion = 1.60;
        requiredAddons[] = {"CACharacters", "CACharacters2", CA_E, "CACharacters_E_Head", "CACharacters_E"};
    };
Must be:
class CfgPatches
[COLOR=#ff0000]{[/COLOR]
  class pal_inf_specops
  [COLOR=#ff0000]{[/COLOR]
    units[] = {"pal_spec_comotd", "pal_spec_strelok", "pal_spec_mgunner", "pal_spec_sabot", "pal_spec_sniper"};
    weapons[] = {};
    requiredVersion = 1.60;
    requiredAddons[] = {"CACharacters", "CACharacters2", CA_E, "CACharacters_E_Head", "CACharacters_E"};
  };
};

Using a text editor with C++ syntax highlighting would help a lot. It would also help if next time you post the error message too, cause usually we suck at guessing them.

#3 n45c4r

n45c4r

    Private First Class

  • Members
  • 14 posts

Posted 08 April 2012 - 05:13 PM

I used C++ text editor. He shows me a error on lines which you improve. In next time i will post an error message.
Thank you.

---------- Post added at 23:13 ---------- Previous post was at 22:30 ----------

I have got a new problem. Arma writes error : File pal\inf specops\config.cpp, line 49: .pal_spec_comotd: Undefined base class 'RUS_Soldier1'
There is this place of code
class pal_spec_comotd : RUS_Soldier1
	{
		vehicleClass = "PAL_inf_specops";
		faction = "Pal";
		scope = public;
		displayName = "Team leader";
		Picture = "\Ca\characters\data\Ico\i_sleader_CA.paa";
		Icon = "\Ca\characters2\data\icon\i_officer_CA.paa";
		
		TextPlural = "$STR_DN_officers";
		TextSingular = "$STR_DN_officer";
		nameSound = "veh_officer";
		accuracy = 3.6;	
		sensitivity = 3.4;
		cost = 500000;
		enableGPS = 1;
		model = "\pal\inf specops\Specnaz";
		identityTypes[] = {"Head_CDF","CDF_Glasses","Language_EN_EP1"};
		hiddenSelectionsTextures[] = {"\pal\inf specops\partizan_vest_co.paa"};
		backpack = "";
		weapons[] = {"M4A1_HWS_GL", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "ItemGPS", "Binocular_Vector", "M9SD"};
		magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenade_West", "HandGrenade_West", "Binocular", "SmokeShellRed", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD"};
		respawnWeapons[] = {"M4A1_HWS_GL", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "ItemGPS", "Binocular_Vector", "M9SD"};
		respawnMagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenade_West", "HandGrenade_West", "Binocular", "SmokeShellRed", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9SD"};
	};


#4 Max Power

Max Power

    Mr. Angry Face

  • Members
  • 12828 posts

Posted 09 April 2012 - 05:49 AM

class Rus_Soldier1;

class  pal_spec_comotd : Rus_Soldier1

{

     ...

};


Posted Image
Posted Image
My inbox is fill and won't be emptied. If your PM is regarding requests to use my work, unfortunately I choose not to grant such permission. My work is for use with CWR2 only.

#5 n45c4r

n45c4r

    Private First Class

  • Members
  • 14 posts

Posted 09 April 2012 - 08:41 AM

I improved this problem myself

Edited by n45c4r, 11 April 2012 - 10:42 AM.


#6 n45c4r

n45c4r

    Private First Class

  • Members
  • 14 posts

Posted 11 April 2012 - 01:40 PM

Please, tell me what wrong in this config.cpp. Error : File pal\config.cpp, line 8: /: 'c' encountered instead of '{'

config
class CfgPatches
    {
    class Pal { units[] = {"PAL_vdv", "PAL_mpeh", "PAL_inf", "PAL_air", "PAL_armor", "PAL_wheel", "PAL_vdv_specops", "PAL_mp_specops", "PAL_inf_specops"}; requiredAddons[] = {}; requiredVersion = 1.60; };
	};


class CfgFactionClasses

	 class Pal
	 {
	  displayName = "-----------";
	  priority = 1;
	  side = TWest;
	 };


class CfgVehicles 
    {
	/*extern*/ class PAL_vdv;
	/*extern*/ class PAL_mpeh;
	/*extern*/ class PAL_inf;
    /*extern*/ class PAL_air;
	/*extern*/ class PAL_armor;
	/*extern*/ class PAL_wheel;
	/*extern*/ class PAL_inf_specops;
	/*extern*/ class PAL_mp_specops;
	/*extern*/ class PAL_vdv_specops;
	};

	
	
};


#7 columdrum

columdrum

    Staff Sergeant

  • Members
  • 351 posts

Posted 11 April 2012 - 03:27 PM

You are mising { } on CfgFactionClasses, and the last }; isn't needed .
class CfgPatches
{
	class Pal 
	{ 
		units[] = {"PAL_vdv", "PAL_mpeh", "PAL_inf", "PAL_air", "PAL_armor", "PAL_wheel", "PAL_vdv_specops", "PAL_mp_specops", "PAL_inf_specops"}; 
		requiredAddons[] = {}; 
		requiredVersion = 1.60;
	};
};


class CfgFactionClasses
{
	class Pal
	{
	  displayName = "-----------";
	  priority = 1;
	  side = TWest;
	};
};

class CfgVehicles 
{
	/*extern*/ class PAL_vdv;
	/*extern*/ class PAL_mpeh;
	/*extern*/ class PAL_inf;
	/*extern*/ class PAL_air;
	/*extern*/ class PAL_armor;
	/*extern*/ class PAL_wheel;
	/*extern*/ class PAL_inf_specops;
	/*extern*/ class PAL_mp_specops;
	/*extern*/ class PAL_vdv_specops;
};

Edited by columdrum, 11 April 2012 - 03:31 PM.


#8 n45c4r

n45c4r

    Private First Class

  • Members
  • 14 posts

Posted 11 April 2012 - 04:30 PM

Thanks, configs are working now. But I have a new error: I can't see my units in game. When I start a editor, I see "no entry : bin\config.bin\CfgVehicles/PAL_vdv.scope". What is that and how improve it ?

Edited by n45c4r, 11 April 2012 - 04:30 PM.
find a mistake


#9 columdrum

columdrum

    Staff Sergeant

  • Members
  • 351 posts

Posted 11 April 2012 - 06:10 PM

First, i dont see the point on the second config only for the CfgFactionClasses, i would add it to the first one. Second, that error is just self explanatory, you have a class PAL_vdv that doenst have the the scope defined. I dont see the config for that unit on the post but should have scope defined:
class PAL_vdv
	{
             (.......)
	  scope = xxxxxxxxx;
             (.......)
	};

Also note that the second config the inheritances on CfgVehicles are wrong( you haven't added the other addon as required), and you may be overiding the ones on the first config with others empty(and that may be causing the error), all that should apear on your RPT(overwriting base class bla bla bla warnings). So just delete the CfgVehicles from there (that does nothing) or corret them.

#10 n45c4r

n45c4r

    Private First Class

  • Members
  • 14 posts

Posted 12 April 2012 - 09:33 AM

I did all how you say, but it's don't work.
There is config for faction 'PAL_vdv', showed in the error. May be somebody will show where is the error ?

Spoiler


#11 columdrum

columdrum

    Staff Sergeant

  • Members
  • 351 posts

Posted 12 April 2012 - 01:22 PM

nvm what i posted... you messed evething up in that last config O_o:
Empty CfgPatches, Empty CfgVehicleClasses... PAL_vdv seems to be what should be inside cfgpatches, and the rest of the clases inside CfgVehicles that you havent even included :s.

You should pay attention to the details :S ; "{"== start, "}"== end , as simple as that( any good sintax highlighter would help a lot). You should read more carefully the online documentation , like http://community.bis...onfig_Reference, http://community.bis...gVehicleClasses . Or any of the existing basic addon making guides before just trying random things :S


fast wrote may content errors:

Spoiler

Edited by columdrum, 12 April 2012 - 01:56 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users