Home   Help Search Login Register  

Author Topic: Config.cpp Question (It's got to be simpler than this...)  (Read 1196 times)

0 Members and 1 Guest are viewing this topic.

Homefry31464

  • Guest
I've got a problem with a simple weapon I put together using INQ's do-it-yourself M4 kit... problem is whenever I add the weapon to a unit in the Mission Editor I get an error message:

'config.bin/CfgWeapons.AMOSM4Ammo'

Config is as follows...

Code: [Select]
class CfgPatches
{
class M4Man
{
units[] = {M4Man};
weapons[] = {};
requiredVersion = 1.20;
};
class AMOSM4
{
units[] = {};
weapons[] = {AMOSM4};
requiredVersion = 1.20;
};
};

class CfgAmmo
{
   class default {};
   class BulletSingle: default {};
   class BulletSniper: BulletSingle {};
   class AMOSM4Ammo: BulletSniper {
   hit=9;
   indirectHit=1;
   minRange=100;
   minRangeProbab=0.100000;
   midRange=150;
   midRangeProbab=0.380000;
   maxRange=400;
   maxRangeProbab=0.040000;
   cartridge="INQ_FxCartridge";
   tracerColor[]={0,0,0,0.000000};
   tracerColorR[]={0,0,0,0.000000};};
};

class CfgWeapons
{
   class Default {};
   class MGun: Default {};
   class Riffle: MGun {};   
   class SniperRiffle : Riffle {};
   class M21 : SniperRiffle{};
   class AMOSM4: M21
   {
      model="\INQ_CONST\M4Scope.p3d";
      displayName="M4 Scope";
      displayNameMagazine="M4 5.56 Mag";
      magazines[]={"AMOSM4Ammo"};
      ammo=AMOSM4Ammo;
      picture="\dtaext\equip\m\m_at4Launcher.paa";
   }
}

class CfgNonAIVehicles
{
class ProxyWeapon {};
class ProxyAMOSM4: ProxyWeapon {};
};



Any idea what is causing this?

Offline oyman

  • Members
  • *
  • king of pings
Re:Config.cpp Question (It's got to be simpler than this...)
« Reply #1 on: 28 Jul 2004, 05:17:00 »
im just guessing here but maybe you need to put some ";"
Code: [Select]
class CfgWeapons
{
   class Default {};
   class MGun: Default {};
   class Riffle: MGun {};  
   class SniperRiffle : Riffle {};
   class M21 : SniperRiffle{};
   class AMOSM4: M21
   {
      model="\INQ_CONST\M4Scope.p3d";
      displayName="M4 Scope";
      displayNameMagazine="M4 5.56 Mag";
      magazines[]={"AMOSM4Ammo"};
      ammo=AMOSM4Ammo;
      picture="\dtaext\equip\m\m_at4Launcher.paa";
   };                        <---------------- there
};                                 <---------------- there
:-\ i dunno


Homefry31464

  • Guest
Re:Config.cpp Question (It's got to be simpler than this...)
« Reply #2 on: 28 Jul 2004, 05:28:20 »
It's fixed... apparently I just needed to change
Code: [Select]
     magazines[]={"AMOSM4Ammo"}; to
Code: [Select]
     magazines[]={"AMOSM4"};

Offline Pathy

  • Former Staff
  • ****
  • I'm not a F***in llama!
    • Volcbat.
Re:Config.cpp Question (It's got to be simpler than this...)
« Reply #3 on: 28 Jul 2004, 11:06:55 »
Either that or actually define the ammo.....you cant say a weapon uses AMOSM4Ammo and then not define it in the Cfgweapons  ;)

eg

Quote
class CfgWeapons
{
   class Default {};
   class MGun: Default {};
   class Riffle: MGun {};  
   class SniperRiffle : Riffle {};
   class M21 : SniperRiffle{};
   class AMOSM4: M21
   {
      model="\INQ_CONST\M4Scope.p3d";
      displayName="M4 Scope";
      displayNameMagazine="M4 5.56 Mag";
      magazines[]={"AMOSM4Ammo"};
      ammo=AMOSM4Ammo;
      picture="\dtaext\equip\m\m_at4Launcher.paa";
   }
      class AMOSM4Ammo: AMOSM4
   {
   scopeWeapon=0;
   scopeMagazine=2;
   displayNameMagazine="M4 Mag.";
   shortNameMagazine="M4 mag";
   picture="\INQ_CONST\W_M4mag.pac";
   };
};

Oh yeah and whos the sexy beast in your avatar  ;D
« Last Edit: 28 Jul 2004, 11:09:12 by Pathy »