OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Homefry31464 on 28 Jul 2004, 05:12:38
-
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...
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?
-
im just guessing here but maybe you need to put some ";"
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
-
It's fixed... apparently I just needed to change
magazines[]={"AMOSM4Ammo"}; to magazines[]={"AMOSM4"};
-
Either that or actually define the ammo.....you cant say a weapon uses AMOSM4Ammo and then not define it in the Cfgweapons ;)
eg
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