Jump to content
Sign in to follow this  
hellfish6

Configging until my brain explodes

Recommended Posts

Hey guys

So I'm working on putting together a couple of configs for a couple projects I'm working on (NAFP, SANDF, etc.). I'm a bit of a noob, so I'd like to know:

1. Is there any kind of useful debugging program? I'm launching OFP and sometimes I'll get an error message, which lets me fix stuff easily, and sometimes I just get a CTD leaving me with little to know idea what went wrong, so I've got to spend countless hours hunting down where I misplaced a colon or bracket. crazy_o.gif

2. Any tips, techniques or advice?

Share this post


Link to post
Share on other sites

start by disabling certain chunks of the code by either the // or the /* and */ (comment tags) if the problem stops the mistake is most probably somewhere in that chunk.

Share this post


Link to post
Share on other sites

I do that, but still it can take some time to isolate the problem.

Do you guys all use Notepad, or is there something better?

Share this post


Link to post
Share on other sites

Right, and as long as you stick to proper indentation (same as standard C programming) then it is much easier to find any errors. In general it takes a long time to become good at debugging, and then it can still take hours sometimes. crazy_o.gif It's like that.

Try ultra edit 32 or any C developer suite, like MS Visual Studio or Borland C. You will get a bit o highlighting. But not debugging. tounge_o.gif

Share this post


Link to post
Share on other sites

Yeah, I made the mistake of indentation already. I copy and pasted parts of another config into mine and it had differing indentation. Took me five days to figure that one out. crazy_o.gif

Share this post


Link to post
Share on other sites

Yeah, so you're learning as you go along. smile_o.gif I know how it is, we've all been there some time.

Share this post


Link to post
Share on other sites

since this is about configging, I got a problem...i got an error that says:

Config tfw_weapons\config.cpp: some input after EndOfFile

What would this signify?

~Bmgarcangel

Share this post


Link to post
Share on other sites

it could be much.. like a easy misstake is when you change the display name for a weapon you..

displayname="M16";

it looks like this, but you want the "true" version so you make a fast fix:

displayname="M16A1;

ahh, much better you say, and contine with the code..but if you check the end.. you see i miss a "

and then you get that error mess, could be many others but that one is pretty common for me.

Share this post


Link to post
Share on other sites

Man I hate working on these...we need a cpp. expert!

Well, I only got this error after like last night.  So Cympatheey finished our M1911 .45 Colt and I was adding the TFW_M1911 parts into the config.  Now, i've skimmed through the M1911 part a few times now and I can't find a error.  Sorry to bring it back, but do you see it?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//****************************************/

//CPP by TFW:CIK Modification

//Animations by TFW:CIK Modification

//Soldiers by TFW:CIK Modification

//Weapons by TFW:CIK Modification

//Textures by TFW:CIK Modification

//© 2003 - 2004 Copyright The Forgotten War: Conflict in Korea Modification

//****************************************/

// some basic defines

#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 true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

#define WeaponNoSlot 0// dummy weapons

#define WeaponSlotPrimary 1// primary weapons

#define WeaponSlotSecondary 16// secondary weapons

#define WeaponSlotItem 256// items

#define WeaponSlotBinocular 4096// binocular

#define WeaponHardMounted 65536

#define CanSeeRadar 1

#define CanSeeRye 2

#define CanSeeOptics 4

#define CanSeeEar 8

#define CanSeeCompass 16

#define CanSeeAll 31

class CfgPatches

{

class TFW_Weapons

{

units[] = {};

weapons[] = {};

requiredVersion = 1.75;

};

};

class CfgModels  

{  

class Default{};  

class Weapon: Default{};

class TFW_ppsha41: Weapon{};

class TFW_thompson: Weapon{};

class TFW_SKS: Weapon{};

class TFW_30cala4: Weapon{};

class TFW_bunk_30cala4: Weapon{};  

class TFW_30cala6: Weapon{};

class TFW_30cala4notri: Weapon{};

class TFW_StenMK2: Weapon{};

class TFW_M1911A1: Weapon{};

};

class CfgAmmo

{

        class default {};

class BulletSingle :default{};

class Bullet7_6: BulletSingle {};

class TFW_ThompsonAmmo :BulletSingle

{

hit=9;

indirectHit=0.5;

indirectHitRange=0.090000;

visibleFire=21

audibleFire=25

visibleFireTime=2

tracerColor[]={0.700000,0.700000,0.500000,0.400000};

tracerColorR[]={0.700000,0.700000,0.500000,0.400000};

model="shell";

simulation="shotBullet";

simulationStep=0.050000;

soundFly[]={"objects\bulletnoise",0.251189,0.700000};

explosive=0;

minRange=1;

minRangeProbab=0.100000;

midRange=160;

midRangeProbab=0.380000;

maxRange=290;

maxRangeProbab=0.040000;

cartridge="FxCartridgeSmall";

cost=0.700000;

initSpeed=700;

};

class TFW_PPSH41Ammo :BulletSingle

{

hit=9;

indirectHit=2;

indirectHitRange=0.100000;

visibleFire=20

audibleFire=26

visibleFireTime=3

tracerColor[]={0.700000,0.700000,0.500000,0.400000};

tracerColorR[]={0.700000,0.700000,0.500000,0.400000};

model="shell";

simulation="shotBullet";

simulationStep=0.050000;

soundFly[]={"objects\bulletnoise",0.251189,0.700000};

explosive=0;

minRange=1;

minRangeProbab=0.100000;

midRange=200;

midRangeProbab=0.380000;

maxRange=400;

maxRangeProbab=0.040000;

cartridge="FxCartridgeSmall";

cost=0.700000;

initSpeed=400;

};

class TFW_StenAmmo :BulletSingle

{

hit=9.7;

indirectHit=0.3;

indirectHitRange=0.090000;

visibleFire=19

audibleFire=18

visibleFireTime=1

tracerColor[]={0.700000,0.700000,0.500000,0.400000};

tracerColorR[]={0.700000,0.700000,0.500000,0.400000};

model="shell";

simulation="shotBullet";

simulationStep=0.050000;

soundFly[]={"objects\bulletnoise",0.251189,0.700000};

explosive=0;

minRange=1;

minRangeProbab=0.100000;

midRange=60;

midRangeProbab=0.380000;

maxRange=190;

maxRangeProbab=0.040000;

cartridge="FxCartridgeSmall";

cost=0.700000;

initSpeed=1250;

};

class TFW_SKSAmmo: BulletSingle

{

// changed

// parametes to make AI decide what mode should be used

hit=10;

indirectHit=1;

indirectHitRange=0.100000;

minRange=1;

minRangeProbab=0.10;

midRange=400;

midRangeProbab=0.80;

maxRange=600;

maxRangeProbab=0.15;

visibleFire=25; // how much is visible when this weapon is fired

audibleFire=25;

visibleFireTime=5; // how long is it visible

cost = 2.5;

};

class 30cala4a6Base : Bullet7_6

{

hit=9;

indirectHit=2;

indirectHitRange=0.1;

tracerColor[]={0.900000,0.000000,0.000000,8.000000};

tracerColorR[]={0.900000,0.000000,0.000000,8.000000};

visibleFire=9;

audibleFire=27;

visibleFireTime=2;

cartridge="FxCartridge";

minRange=0;

minRangeProbab=0.100000;

midRange=520;

midRangeProbab=0.700000;

maxRange=800;

maxRangeProbab=0.040000;

};

class TFW_M1911Ammo: BulletSingle

{

access=2;

hit=7.9;

indirectHit=1;

indirectHitRange=0.050000;

visibleFire=14;

audibleFire=14;

visibleFireTime=2;

minRange=0;

minRangeProbab=0.100000;

midRange=10;

midRangeProbab=0.700000;

maxRange=100;

maxRangeProbab=0.040000;

cartridge="FxCartridgeSmall";

tracerColor[]={0.800000,0.500000,0.100000,0.040000};

tracerColorR[]={0,0,0,0.005000};

};

};

};

class CfgRecoils

{

//time, rear, up

30calrecoil[]= {0.050000,0.020000,"0.04*1.35",0.050000,0.010000,"0.01*0.5",0.050000,0.030000,"0.04*1.35",0.050000,0.020000,"0.02*0.5",0.050000,0.040000,"0.04*1.35",0.010000,0,0};

30cala4recoil[]= {0.050000,0.020000,"0.04*1.35",0.050000,0.010000,"0.01*0.5",0.050000,0.030000,"0.04*1.35",0.050000,0.020000,"0.02*0.5",0.050000,0.040000,"0.04*1.35",0.020000,0,0};

};

class CfgWeapons

{

class Default {};

class MGun: Default {};

class Riffle: MGun {};

class HandGunBase: Riffle {};

class MachineGun7_6: MGun {};

class MachineGun7_6Manual: MachineGun7_6 {};

class M60: MachineGun7_6Manual {};

class MachineGun12_7: MachineGun7_6{};

class Browning: MachineGun12_7{};

class TFW_thompson:Riffle

{

displayName = M1A1;

displayNameMagazine="M1A1 Mag";

shortNameMagazine="M1A1";

scopeWeapon = public;

scopeMagazine = public;

model="\TFW_Weapons\SMG\TFW_thompson.p3d";

modelOptics="optika_m16";

optics = true;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

                picture="\TFW_Weapons\Pics\Thompson.pac";

              count=30;

ammo="TFW_ThompsonAmmo";

magazines[]={"TFW_thompsonmag"};

reloadMagazineSound[]={\TFW_Sounds\ThompsonReload.ogg,0.0316,1};

modes[]={"FullAuto"};

class FullAuto

{

ammo="TFW_ThompsonAmmo";

multiplier=1;

burst=1;

dispersion=0.009;

displayName="M1A1 (Auto)";

sound[]={"\TFW_Sounds\Thompson.ogg",db0,1.95};

soundContinuous=0;

reloadTime=0.10;

ffCount=30;

recoil="riffleBurst3";

autoFire=1;

aiRateOfFire=0.10;

aiRateOfFireDistance=40;

useAction=0;

useActionTitle="";

};

};

class TFW_STENMK2:Riffle

{

displayName = Sten Mark II;

displayNameMagazine="Sten Mag";

shortNameMagazine="Sten Mag";

scopeWeapon = public;

scopeMagazine = public;

model="\TFW_Weapons\SMG\TFW_StenMK2.p3d";

modelOptics="optika_HK";

              picture="\TFW_Weapons\Pics\ppsh.pac";

optics = true;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

                count=32;

magazines[]={"TFW_Stenmag"};

reloadMagazineSound[]={\TFW_Sounds\Stenreload.ogg,0.0316,1};

modes[]={"FullAuto"};

class FullAuto

{

ammo="BulletSingleG";

multiplier=1;

burst=1;

dispersion=0.0015;

displayName="Sten Mark II";

sound[]={"\TFW_Sounds\sten.ogg",db0,1.95};

soundContinuous=0;

reloadTime=0.09;

ffCount=32;

recoil="riffleBurst3";

autoFire=1;

aiRateOfFire=0.085;

aiRateOfFireDistance=90;

useAction=0;

useActionTitle="";

};

};

class TFW_PPSH41:Riffle

{

displayName = PPSH 41;

displayNameMagazine="PPSH Mag";

shortNameMagazine="PPSH Mag";

scopeWeapon = public;

scopeMagazine = public;

model="\TFW_Weapons\SMG\TFW_ppsha41.p3d";

modelOptics="optika_PK";

optics = true;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

                picture="\TFW_Weapons\Pics\ppsh.pac";

              count=71;

ammo="TFW_PPSH41Ammo";

magazines[]={"TFW_PPSH41mag"};

reloadMagazineSound[]={\TFW_Sounds\PPSHreload.ogg,0.0316,1};

modes[]={"FullAuto","Single"};

class FullAuto

{

ammo="TFW_PPSH41Ammo";

multiplier=1;

burst=1;

dispersion=0.015;

displayName="PPSH-41 (Auto)";

sound[]={"\TFW_Sounds\PPSH.ogg",db0,1.95};

soundContinuous=0;

reloadTime=0.11;

ffCount=30;

recoil="riffleBurst3";

autoFire=1;

aiRateOfFire=0.01;

aiRateOfFireDistance=70;

useAction=0;

useActionTitle="";

};

class Single

{

ammo="TFW_PPSH41Ammo";

multiplier=1;

burst=0;

displayName="PPSH-41 (Single)";

dispersion=0.000200;

soundContinuous=0;

reloadTime=0.10;

sound[]={"\TFW_Sounds\PPSH.ogg",db0,1.95};

ffCount=1;

recoil="riffleSingle";

autoFire=0;

aiRateOfFire=1.100000;

aiRateOfFireDistance=200;

useAction=0;

useActionTitle="";

};

};

class TFW_SKS:Riffle

{

displayName = SKS Rifle;

displayNameMagazine="7.62 x 39 Clip";

shortNameMagazine="7.62 x 39 Clip";

scopeWeapon = public;

scopeMagazine = public;

model="\TFW_Weapons\Rifles\TFW_SKS.p3d";

modelOptics="optika_m16";

optics = true;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

                picture="\TFW_Weapons\Pics\SKS.pac";

              count=10;

ammo="TFW_SKSAmmo";

magazines[]={"TFW_SKSmag"};

reloadMagazineSound[]={\TFW_Sounds\SKSreload.ogg,0.0316,1};

modes[]={"Single"};

class Single

{

ammo="TFW_SKSAmmo";

multiplier=1;

burst=0;

displayName="SKS (Single)";

dispersion=0.000200;

soundContinuous=0;

reloadTime=0.10;

sound[]={"\TFW_Sounds\SKS.ogg",db0,2.00};

ffCount=1;

recoil="riffleSingle";

autoFire=0;

aiRateOfFire=5.000000;

aiRateOfFireDistance=200;

useAction=0;

useActionTitle="";

};

};

class TFW_30calA6: M60

{

scopeWeapon=2;

scopeMagazine=2;

            model="\TFW_Weapons\Machine Guns\TFW_30cala6.p3d";

optics = true;

opticsZoomMin=0.35;

picture="\TFW_Weapons\pics\Ma6_w.paa";

opticsZoomMax=0.35;

displayName = "M1919A6 Bipod";

displayNameMagazine = "7.62mm 150 Round belt";

shortNameMagazine = "7.62mm belt";

modelOptics="optika_m16";

magazineType = 2 * WeaponSlotItem;

magazines[]={"tfw_30calmag"};

        count = 150;

multiplier=1;

magazineReloadTime=4.8;

burst=1;

dispersion=0.0017;

reloadMagazineSound[]={\TFW_Sounds\30cal_Reload.ogg,0.0316,1};

drySound[]={"weapons\m16dry",0.000316,1};

modes[]={"Fullauto"};

            class Fullauto

  {

      ammo="30cala4a6Base";

multiplier=1;

      burst=1;

    displayName="M1919A6 Bipod";

reloadTime=0.09;

sound[]={"\TFW_Sounds\30cal_shoot.ogg",db0,1.96};

soundContinuous=0;

dispersion=0.005000;

aiDispersionCoefX=4.000000;

aiDispersionCoefY=3.000000;

ffCount=150;

recoil=riffleSingle;

autoFire=1;

aiRateOfFire=0.9000;

aiRateOfFireDistance=1000;

useAction=0;

useActionTitle="";

};      

};

class TFW_30calA4: M60

{

scopeWeapon=2;

scopeMagazine=2;

            model="\TFW_Weapons\Machine Guns\TFW_30cala4notri.p3d";

optics = true;

opticsZoomMin=0.35;

picture="\TFW_Weapons\pics\ma4_w.paa";

opticsZoomMax=0.35;

displayName = "M1919A4";

displayNameMagazine = "7.62mm 150 Round belt";

shortNameMagazine = "7.62mm belt";

modelOptics="optika_m16";

magazineType = 2 * WeaponSlotItem;

magazines[]={"tfw_30cala4Mag"};

        count = 150;

multiplier=1;

magazineReloadTime=4.8;

burst=1;

dispersion=0.0017;

reloadMagazineSound[]={\TFW_Sounds\30cal_Reload.ogg,0.0316,1};

drySound[]={"weapons\m16dry",0.000316,1};

modes[]={"Fullauto"};

            class Fullauto

  {

      ammo="30cala4a6Base";

multiplier=1;

      burst=1;

    displayName="M1919A4";

reloadTime=0.09;

sound[]={"\TFW_Sounds\30cal_shoot.ogg",db0,1.96};

soundContinuous=0;

dispersion=0.005000;

aiDispersionCoefX=4.000000;

aiDispersionCoefY=3.000000;

ffCount=150;

recoil=riffleSingle;

autoFire=1;

aiRateOfFire=0.9000;

aiRateOfFireDistance=1000;

useAction=0;

useActionTitle="";

};      

};

class TFW_30calA4tri: Browning

{

ammo=30cala4a6Base;

displayName="M1919A4 Tripod";

displayNameMagazine="7.62mm 250 Round belt";

shortNameMagazine="7.62mm belt";

count=250;

reloadTime=0.107;

magazineReloadTime=4.8;

sound[]={"\TFW_Sounds\30cal_shoot.ogg",db0,1.96};

                  soundContinuous=0;

initSpeed=1000;

autoReload = false;

aiRateOfFire=0.4; // delay between shots at given distance

aiRateOfFireDistance=1000; // at shorter distance delay goes lineary to zero

reloadMagazineSound[]={\TFW_Sounds\30cal_Reload.ogg,db-0,1};

};

class TFW_30calA4bunker: Browning

{

ammo=30cala4a6Base;

displayName="M1919A4 Tripod";

displayNameMagazine="7.62mm 250 Round belt";

shortNameMagazine="7.62mm belt";

count=250;

reloadTime=0.107;

magazineReloadTime=4.8;

sound[]={"\TFW_Sounds\30cal_shoot.ogg",db0,1.96};

                  soundContinuous=0;

initSpeed=1000;

autoReload = false;

aiRateOfFire=0.4; // delay between shots at given distance

aiRateOfFireDistance=1000; // at shorter distance delay goes lineary to zero

reloadMagazineSound[]={\TFW_Sounds\30cal_Reload.ogg,db-0,1};

};

class TFW_M1911: HandGunBase

{

access=2;

scopeWeapon=0;

scopeMagazine=0;

weaponType=2;

magazineType=32;

model="\TFW_Weapons\Hand Guns\TFW_M1911.p3d";

modelOptics="\O\Guns\optika_glock17";

picture="\TFW_Weapons\Pics\M1911.pac";

optics=1;

opticsZoomMin=0.350000;

opticsZoomMax=0.350000;

distanceZoomMin=300;

distanceZoomMax=300;

displayName=".45 Colt";

displayNameMagazine=".45 mag";

shortNameMagazine=".45 mag";

count=8;

reloadTime=0.100000;

magazineReloadTime=1;

reloadMagazineSound[]={"\TFW_Sounds\SKSreload.ogg",0.004623,1.000000};

drySound[]={"weapons\M16dry",0.003162,1};

magazines[]={"TFW_M1911mag"};

modes[]={"Single"};

class Single

{

ammo="TFW_M1911Ammo";

multiplier=1;

burst=1;

displayName=".45 Colt";

dispersion=0.002000;

sound[]={"\TFW_Sounds\45colt.ogg",db0,1.96};

soundContinuous=0;

reloadTime=0.100000;

ffCount=1;

recoil="riffleSilenced";

autoFire=0;

aiRateOfFire=0.500000;

aiRateOfFireDistance=50;

useAction=0;

useActionTitle="";

};

};

class tfw_30calMag: TFW_30calA6

{

                           picture="\TFW_Weapons\pics\ma4_a.paa";

scopeWeapon=0;

scopeMagazine=2;

};

class tfw_30cala4Mag: TFW_30calA4

{

                           picture="\TFW_Weapons\pics\ma4_a.paa";

scopeWeapon=0;

scopeMagazine=2;

};

class TFW_SKSmag: TFW_SKS

{

                           picture="\TFW_Weapons\Pics\SKSm.pac";

scopeWeapon=0;

scopeMagazine=2;

};

class TFW_PPSH41mag: TFW_PPSH41

{

                           picture="\TFW_Weapons\Pics\ppshm.pac";

scopeWeapon=0;

scopeMagazine=2;

};

class TFW_Thompsonmag: TFW_Thompson

{

                           picture="\TFW_Weapons\Pics\thompsonM.pac";

scopeWeapon=0;

scopeMagazine=2;

};

class TFW_Stenmag: TFW_StenMK2

{

                           picture="\TFW_Weapons\Pics\ppshm.pac";

scopeWeapon=0;

scopeMagazine=2;

};

class TFW_M1911Mag: TFW_M1911

{

scopeMagazine=2;

picture="\TFW_Weapons\Pics\M1911m.pac";

};

};

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land:AllVehicles{};

class Man:Land{};

class Soldier:Man{};

class SoldierEB:Soldier{};

class SoldierWB:Soldier{};

class tfw_CSoldierPPSHA: SoldierEB

{

displayName="PPSHA-41";

vehicleclass="TFW:CIK ( Men ) ";

weapons[]={"TFW_PPSH41","Throw","Put"};

accuracy=5;

magazines[]={TFW_PPSH41Mag,TFW_PPSH41Mag,TFW_PPSH41Mag,TFW_PPSH41Mag,TFW_PPSH41Mag};

};

class tfw_CSoldiertype56: SoldierEB

{

displayName="SKS Rifle";

vehicleclass="TFW:CIK ( Men ) ";

weapons[]={"TFW_SKS","Throw","Put"};

accuracy=5;

magazines[]={TFW_SKSMag,TFW_SKSMag,TFW_SKSMag,TFW_SKSMag,TFW_SKSMag};

};

class tfw_USSoldierThompson: SoldierWB

{

displayName="M1A1 Thompson SMG";

vehicleclass="TFW:CIK ( Men ) ";

weapons[]={"tfw_thompson","Throw","Put"};

accuracy=5;

magazines[]={tfw_thompsonMag,tfw_thompsonMag,tfw_thompsonMag,tfw_thompsonMag,tfw_thompsonMag};

};

class tfw_USSoldierM19a4: SoldierWB

{

displayName="M1919A4";

vehicleclass="TFW:CIK ( Men ) ";

weapons[]={"tfw_30calA4","Throw","Put"};

accuracy=5;

magazines[]={tfw_30cala4Mag,tfw_30cala4Mag,tfw_30cala4Mag,tfw_30cala4Mag,tfw_30cala4Mag};

};

class tfw_USSoldierM19a6: SoldierWB

{

displayName="M1919A6 Bipod";

vehicleclass="TFW:CIK ( Men ) ";

weapons[]={"tfw_30calA6","Throw","Put"};

accuracy=15;

magazines[]={tfw_30calMag,tfw_30calMag,tfw_30calMag,tfw_30calMag,tfw_30calMag};

};

class tfw_BRITSoldierSten: SoldierWB

{

displayName="Sten Mark II SMG";

vehicleclass="TFW:CIK ( Men ) ";

weapons[]={"tfw_stenmk2","Throw","Put"};

accuracy=15;

magazines[]={tfw_stenMag,tfw_stenMag,tfw_stenMag,tfw_stenMag,tfw_stenMag};

};

class tfw_Colt45: SoldierWB

{

displayName=".45 Colt";

vehicleclass="TFW:CIK ( Men ) ";

weapons[]={"tfw_M1911","Throw","Put"};

accuracy=15;

magazines[]={tfw_M1911Mag,tfw_M1911Mag,tfw_M1911Mag,tfw_M1911Mag,tfw_M1911Mag};

};

class LandVehicle: Land{};

class Tank: LandVehicle{};  

class APC: Tank{};

class M113:APC{};

class M2StaticMG: M113{};

class M2StaticMGW: M2StaticMG{};

class tfw_USarmorM19a4: M2StaticMGW

{

  vehicleclass="TFW:CIK ( Armored )";

  displayName="M1919A4 on Tripod";

  class reflectors {};

                    picture="m2";

                    model="\TFW_Weapons\Machine Guns\TFW_30cala4.p3d";

  cost=3000;

  weapons[]={"TFW_30calA4tri"}; magazines[]={"TFW_30calA4tri","TFW_30calA4tri","TFW_30calA4tri"};

            side=1;

  getInAction="ManActLying";

        getOutAction="ManActStand";

        gunnerAction="ManActm19a4gunner";

        gunnerInAction="ManActm19a4gunner";

  camouflage=3;

  secondaryExplosion = 1;

  gunnerCanSee=31;

  threat[]={1,1,0.400000};

  crew="SoldierWB";

  armor=90;

  armorStructural=20.000000;

  icon="kulomet.paa";

  class Turret

{

gunAxis = "osahlavne";

turretAxis = "osaveze";

soundServo[]={Vehicles\gun_elevate2,db-30,1.0};

gunBeg = "usti hlavne";

gunEnd = "konec hlavne";

body = "OtocVez";

gun = "OtocHlaven";

minElev=-15;

maxElev=+15;

minTurn=-34;

maxTurn=+34;

};

};

class tfw_USbunkerM19a4: M2StaticMGW

{

  vehicleclass="TFW:CIK ( Armored )";

  class reflectors {};

  displayName="M1919A4 On Box";

                    picture="m2";

                    model="\TFW_Weapons\Machine Guns\TFW_bunk_30cala4.p3d";

  cost=15000;

  weapons[]={"TFW_30calA4bunker"}; magazines[]={"TFW_30calA4bunker","TFW_30calA4bunker","TFW_30calA4bunker","TFW_30calA4bunker"};

            side=1;

  getInAction="ManActStand";

        getOutAction="ManActStand";

        gunnerAction="ManActSandBagGunner";

        gunnerInAction="ManActSandBagGunner";

  camouflage=8;

  gunnerCanSee=31;

  secondaryExplosion = 1;

  threat[]={1,1,0.400000};

  crew="SoldierWB";

  armor=120;

  armorStructural=50.000000;

  icon="kulomet.paa";

  class Turret

{

gunAxis = "osahlavne";

turretAxis = "osaveze";

soundServo[]={Vehicles\gun_elevate2,db-30,1.0};

gunBeg = "usti hlavne";

gunEnd = "konec hlavne";

body = "OtocVez";

gun = "OtocHlaven";

minElev=-15;

maxElev=+15;

minTurn=-34;

maxTurn=+34;

};

};

};

class CfgNonAIVehicles

{

class ProxyWeapon {};

class ProxyTFW_ppsh41: ProxyWeapon {};

class ProxyTFW_thompson: ProxyWeapon {};

class ProxyTFW_30calA6: ProxyWeapon {};

class ProxyTFW_30calA4: ProxyWeapon {};

class Proxytpillbox: ProxyWeapon{};

class ProxyTFW_30calA4bunker: ProxyWeapon{};

class ProxyTFW_SKS: ProxyWeapon {};

class ProxyTFW_StenMK2: ProxyWeapon {};

class ProxyTFW_M1911: ProxyWeapon {};

};

class CfgVehicleActions

{

m19a4gunner="m19a4gunner";

SandBagGunner="Crouch";

};

class CfgMovesMC

{

class Default {};

     class DefaultDie: Default {};

       class States

       {

class DeadState: Default {};

        class Driver: Default {};

class m19a4gunner: Driver

{

file="\TFW_Anim\m19a4gunner.rtm";

speed=10000000000.000000;

looped=1;

variantsAI[]={"m19a4gunnerV1",0.700000,"m19a4gunner"};

interpolateWith[]={"m19a4gunnerV1",0.500000};

equivalentTo="m19a4gunner";

interpolationSpeed=1;

connectTo[]={"m19a4gunnerDying",1};

};

class m19a4gunnerV1: m19a4gunner

{

file="\TFW_Anim\m19a4gunner.rtm";

speed=-4;

looped=1;

};

class m19a4gunnerDying: DefaultDie

{

actions="NoActions";

file="plazenismrt.rtm";

speed=-1;

looped=0;

soundEnabled=0;

connectFrom[]={"m19a4gunner",1};

};

class m19a4gunnerDead: m19a4gunnerDying

{

actions="DeadActions";

file="plazenismrt2.rtm";

speed=10000000000.000000;

terminal=1;

connectFrom[]={"m19a4gunnerDying",1};

connectTo[]={"DeadState",1};

};

};

};

Share this post


Link to post
Share on other sites

Usally an EndofFile Error occurs when you have 3 }; in an row under each other to signify that u have ended the file, but infact you haven't beacuse there is still information.

so i think this is your problem, not 100% sure tho

class TFW_M1911Ammo: BulletSingle

{

access=2;

hit=7.9;

indirectHit=1;

indirectHitRange=0.050000;

visibleFire=14;

audibleFire=14;

visibleFireTime=2;

minRange=0;

minRangeProbab=0.100000;

midRange=10;

midRangeProbab=0.700000;

maxRange=100;

maxRangeProbab=0.040000;

cartridge="FxCartridgeSmall";

tracerColor[]={0.800000,0.500000,0.100000,0.040000};

tracerColorR[]={0,0,0,0.005000};

};

};

};

^ Remove the extra };

^

Share this post


Link to post
Share on other sites

I always keep a basic template of configs for certain classes.And simple go from there.It helps me. wink_o.gif

Share this post


Link to post
Share on other sites
Guest

I just want to know if Hellfish's brain has exploded yet wink_o.gifbiggrin_o.gif

Share this post


Link to post
Share on other sites

LOL

Leone, you avatar looks like the Mamonth* from C&C: Tiberium Son

Put your head in the view of my sights and i'll do so  mad_o.gif   crazy_o.gif

Anyone know how to get animations into the cpp.?

Share this post


Link to post
Share on other sites

Looking at the config above and looking at other configs, Im trying to figure out if there are specific reserve words the system uses or when you make a class is everything within the statement made by the user. Is there a list of reserve terms (like simulation, model, ammo) or are these terms made by the developer when creating the class??

Share this post


Link to post
Share on other sites
Try ultra edit 32   or any C developer suite, like MS Visual Studio or Borland C.  You will get a bit o highlighting.  But not debugging.  tounge_o.gif

I actually don't know about those tools mentioned above (but I would expect them to have such a function build in), e.g. so-called LINT tools might help you a bit with debugging. Those are more or less syntax checkers, and they are supposed to find such things as unmatched brackets and similar stuff. As the config file is in C++ it should be easy to find a free one online, that could help you there.

With respect to editors, I bet you can also find a lot of free C++-Editors, with syntax highlighting, auto-indention, auto-completion, post-beautification, <put in other functions you find in many editors>.

I always wondered, has nobody yet written an OFP-ScriptEditor, or an OFP-mode for a customizable editor like XEmacs. I can't imagine that people are coding their scripts in Note- or Wordpad...

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  

×