Jump to content
Sign in to follow this  
logimenn

Undefined base class, help.

Recommended Posts

Hi

I want to make a simple (its not that simple IMHO) addon but I cant go through all this classes etc.

EDIT:

Why my addon is not showed in Editor ?

What im doing wrong ?

#define ReadAndWrite 0

#define ReadAndCreate 1

#define ReadOnly 2

#define ReadOnlyVerified 3

#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 private 0

#define protected 1

#define public 2

#define true 1

#define false 0

class CfgPatches {

class AH1_AG {

units[] = {};

weapons[] = {};

requiredVersion = 0.100000;

requiredAddons[] = {};

};

};

class CfgVehicles {

class Helicopter; // External class reference

class AH1_AG : Helicopter {

scope = private;

side = TWest;

faction = USMC;

displayName = $STR_AH1AG;

selectionHRotorStill = "mainRotorStatic";

selectionHRotorMove = "mainRotorBlurred";

selectionVRotorStill = "tailRotorStatic";

selectionVRotorMove = "tailRotorBlurred";

memoryPointLMissile = "Missile_1";

memoryPointRMissile = "Missile_2";

memoryPointLRocket = "Rocket_1";

memoryPointRRocket = "Rocket_2";

selectionFireAnim = "muzzleflash";

crew = "USMC_Soldier_Pilot";

vehicleClass = "Air";

accuracy = 1000; // accuracy needed to recognize type of this target

driverAction = "AH1Z_Pilot";

memoryPointsGetInDriver = "pos_driver";

memoryPointsGetInDriverDir = "pos_driver_dir";

getInAction = "GetInHigh";

getOutAction = "GetOutHigh";

maxSpeed = 270; // max speed on level road, km/h

typicalCargo[] = {"USMC_Soldier_Pilot", "USMC_Soldier_Pilot"};

driverCompartments = "Compartment1";

soundGetIn[] = {"ca\sounds\air\noises\heli_door_01", db-10, 1};

soundGetOut[] = {"ca\sounds\air\noises\heli_door_01", db-10, 1, 50};

soundDammage[] = {"ca\sounds\air\noises\alarm_loop1", 0.001, 1};

soundEngineOnInt[] = {"ca\sounds\Air\UH1Y\int\int-start-final", 0.0316228, 1.0};

soundEngineOnExt[] = {"ca\sounds\Air\UH1Y\ext\ext-motor-start", 1.77828, 1.0, 700};

soundEngineOffInt[] = {"ca\sounds\Air\UH1Y\int\int-stop-final", 0.0316228, 1.0};

soundEngineOffExt[] = {"ca\sounds\Air\UH1Y\ext\ext-motor-stop", 1.77828, 1.0, 700};

armor = 60;

damageResistance = 0.00593;

cost = 10000000;

model = "\ca\air\ah1z";

picture = "\ca\air\data\ico\ah1z_CA.paa";

mapSize = 15.5;

Icon = "\ca\air\data\map_ico\icomap_ah1z_CA.paa";

weapons[] = {};

magazines[] = {};

class Turrets;

class MainTurret;

class Dzialko : MainTurret {

gunnerAction = "AH1Z_Gunner";

gunnerInAction = "AH1Z_Gunner";

gunnerCompartments = "Compartment2";

weapons[] = {M197, "HellfireLauncher", "HellfireLauncher", "SidewinderLaucher_AH1Z"};

magazines[] = {"750Rnd_M197_AH1", "8Rnd_Hellfire", "8Rnd_Hellfire", "2Rnd_Sidewinder_AH1Z"};

memoryPointsGetInGunner = "pos_gunner";

memoryPointsGetInGunnerDir = "pos_gunner_dir";

gunnerGetInAction = "GetInHigh";

gunnerGetOutAction = "GetOutHigh";

memoryPointGun = "machinegun";

minElev = -60;

maxElev = 10;

initElev = 0;

minTurn = -70;

maxTurn = 70;

initTurn = 0;

gunnerOpticsModel = "\ca\air\optika_AH1Z";

gunnerOpticsEffect[] = {"TankCommanderOptics1", BWTV};

enableManualFire = 1;

class ViewOptics {

initAngleX = 0;

minAngleX = -30;

maxAngleX = 30;

initAngleY = 0;

minAngleY = -100;

maxAngleY = 100;

initFov = 0.155;

minFov = 0.047;

maxFov = 0.155;

};

};

};

// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types

threat[] = {0.3, 1, 0.8};

laserScanner = true;

};

class Plane;

class AV8B2 : Plane {

scope = public;

crew = "USMC_Soldier_Pilot";

destrType = "DestructWreck";

model = "\ca\air\av8b2";

picture = "\ca\air\data\ico\av8b_CA.paa";

Icon = "\ca\air\data\map_ico\icomap_AV8B_CA.paa";

mapSize = 14;

side = TWest;

faction = USMC;

displayName = $STR_AV8BAA;

vehicleClass = "Air";

accuracy = 0.3; // accuracy needed to recognize type of this target

typicalCargo[] = {"USMC_Soldier_Pilot"};

irScanRangeMin = 3500;

driverAction = "AV8B_Pilot";

laserScanner = true;

dustEffect = "HeliDust";

waterEffect = "HeliWater";

memoryPointLRocket = "L raketa";

memoryPointRRocket = "P raketa";

maxSpeed = 1040; // max speed on level road, km/h

landingSpeed = 200;

vtol = 1;

aileronSensitivity = 0.8; // relative aileron sensitivity

elevatorSensitivity = 0.6; // relative elevator sensitivity

envelope[] = {0.0, 0.2, 1.2, 3.0, 5.1, 7.0, 7.3, 7, 6.3, 5.2, 3.8, 1.8, 0.5, 0};

armor = 40;

damageResistance = 0.01246;

cost = 20000000;

weapons[] = {GAU12, "SidewinderLaucher_AH1Z", "SidewinderLaucher_AH1Z", "SidewinderLaucher_AH1Z"};

magazines[] = {"300Rnd_25mm_GAU12", "2Rnd_Sidewinder_AH1Z", "2Rnd_Sidewinder_AH1Z", "2Rnd_Sidewinder_AH1Z"};

insideSoundCoef = 0.2;

fov = 0.5;

gunAimDown = 0.07;

type = VAir;

// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types

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

};

class AV8B : AV8B2 {

model = "\ca\air\av8b";

displayName = $STR_AV8BAG;

accuracy = 1000; // accuracy needed to recognize type of this target

// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types

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

weapons[] = {GAU12, "BombLauncher", "BombLauncher"};

magazines[] = {"300Rnd_25mm_GAU12", "6Rnd_GBU12_AV8B", "6Rnd_GBU12_AV8B"};

};

};

----------------------------

Now, at starting armaII i got this:

file moreair\config.cpp,line 270: /CfgVehicles/Helicopter.AnimationSources: Undefined Base Class 'Animation Sources'

As i remember in OFP its was not neccessary to copy and paste half config file to make addon. Just define important classes in right order,change specified parameters wich u want and that's all.

Please tell me where is the mistake(s) here in this cpp.

http://rapidshare.com/files/253552282/config.cpp

Thank's a lot and sorry for bad english.

Edited by logimenn
another problem

Share this post


Link to post
Share on other sites

when ever you need to call a base class from ARMA II you gotta use

/*extern*/ class Air;

for example. i dont know exactly the class name for what you need. but its something like this:

class CfgVehicles

{

class AllVehicles;

class Air: AllVehicles

{

/*extern*/ class NewTurret;

/*extern*/ class Air;

};

class Plane {

/*extern*/ class ViewPilot;

};

class av8b2: Plane

{

...

and you gotta delete the class turrets; and class mainturrets;

Share this post


Link to post
Share on other sites

Ok, thanks lonewolf_campi

Now i have something like this and error : CfgVehicles, encountered "{" instead of "=", line 45

class CfgPatches {

class AH1_AG {

units[] = {ah1_ag};

weapons[] = {};

requiredVersion = 0.100000;

requiredAddons[] = {"CAWeapons", "CAAir"};

};

};

class CfgVehicleClasses {

access = ReadAndCreate;

class AH1_AG {

displayName = $STR_VEHICLECLASS;

};

};

class CfgVehicles {

class AllVehicles;

class Air: AllVehicles {

/*extern*/ class NewTurret;

/*extern*/ class Air;

};

class Helicopter; // External class reference

class AH1_AG : Helicopter {

scope = private;

side = TWest;

faction = USMC;

displayName = $STR_AH1AG;

maxSpeed = 270; // max speed on level road, km/h

weapons[] = {M197, "HellfireLauncher", "HellfireLauncher", "SidewinderLaucher_AH1Z"};

magazines[] = {"750Rnd_M197_AH1", "8Rnd_Hellfire", "8Rnd_Hellfire", "2Rnd_Sidewinder_AH1Z"};

// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types

threat[] = {0.3, 1, 0.8};

laserScanner = true;

};

class Plane; {

/*extern*/ class ViewPilot;

};

class AV8B2 : Plane {

scope = public;

side = TWest;

faction = USMC;

displayName = $STR_AV8BAA;

weapons[] = {GAU12, "SidewinderLaucher_AH1Z", "SidewinderLaucher_AH1Z", "SidewinderLaucher_AH1Z"};

magazines[] = {"300Rnd_25mm_GAU12", "2Rnd_Sidewinder_AH1Z", "2Rnd_Sidewinder_AH1Z", "2Rnd_Sidewinder_AH1Z"};

// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types

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

};

class AV8B : AV8B2 {

model = "\ca\air\av8b";

displayName = $STR_AV8BAG;

// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types

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

weapons[] = {GAU12, "BombLauncher", "BombLauncher"};

magazines[] = {"300Rnd_25mm_GAU12", "6Rnd_GBU12_AV8B", "6Rnd_GBU12_AV8B"};

};

};

WTF ?

Share this post


Link to post
Share on other sites

     class Plane; {
   /*extern*/ class ViewPilot;
   };

Remove the ';' after Plane

btw, there is no need to include the comment /*extern*/ for classes that are inherited from elsewhere.

Planck

Share this post


Link to post
Share on other sites

thanks Planck Ill try this tomorrow :)

EDIT:

Still my addons didnt show up in editor :( Whats wrong with this ?

Edited by logimenn

Share this post


Link to post
Share on other sites

On your CfgPatches, maybe you should have it like

units[] = {"ah1_ag"};

instead of

units[] = {ah1_ag};

(In case you don't see: the "'s are the difference.)

Share this post


Link to post
Share on other sites
On your CfgPatches, maybe you should have it like

units[] = {"ah1_ag"};

instead of

units[] = {ah1_ag};

(In case you don't see: the "'s are the difference.)

Didn't work. Any other suggestions ? :)

Share this post


Link to post
Share on other sites

you could set the scope of your Ah_1ag to "public"; that might help.

If not, delete your whole vehicleClass definition and try again.

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  

×