Home   Help Search Login Register  

Author Topic: Config help  (Read 1988 times)

0 Members and 1 Guest are viewing this topic.

Offline Lurchisme

  • Members
  • *
  • I'm supposed to write something here, right?
Config help
« on: 10 Dec 2007, 02:53:58 »
Hi all. I'm currently working on a series of addons to be used with Mando's missile script, but it's still early days yet. Right at the moment, I'm having trouble getting the config to work. I've tried comparing it to other peaples addon configs, deleting bits, adding bits, but I keep getting the error message:

Quote
File tlauncher\config.cpp, line 27: '/CfgVehicleClasses/CfgVehicles.Class':'A' encountered instead of '='

The config itself goes

Quote
#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

class CfgPatches

{

        class DPD_MissileSet
        {
            units[] = {"Tomahawk_Launcher"};
            weapons[] = {};
           requiredVersion = 1.00;
   };
};


class CfgVehicleClasses
{
   class DPD_Launcher
    {
      displayName = "Static Launchers";
   };
   


 

class CfgVehicles
{

      Class All {};
      Class Static : Building {};
      Class Strategic : Building {};
/*extern*/   Class Fortress1: Strategic {};
      Class DPD_Launcher : Fortress1 {};


      

 
   class Tomahawk_Launcher: DPD_Launcher
        {      
      model="\TLauncher\TLauncher";
      scope=2;
      mapSize=8;
      vehicleClass="DPD_Launcher";
      displayName="Tomahawk Launcher";
      icon="\Tlauncher\icons\Tlauncher.PAA";   
        };

};

{

/*extern*/   Class Plane;
      class DPD_Missiles : Plane
      Class Tomahawk : DPD_Missiles

        {      
      model="\TLauncher\Tomahawk";
      scope=2;
      mapSize=5;
      vehicleClass="Static_Launchers";
      displayName="Tomahawk";
      icon="\Tlauncher\icons\THawk.PAA";   
        };






};


Any help would be greatly appreciated. Thanks.
? (Newbiefactor == 1) && (Spammfactor == 1) : UserTroll = True; Player join objnull

Offline bdfy85

  • Contributing Member
  • **
Re: Config help
« Reply #1 on: 10 Dec 2007, 03:10:44 »
search for wrong bracket ;)
Liberation Mod scripts&balance

Offline Lurchisme

  • Members
  • *
  • I'm supposed to write something here, right?
Re: Config help
« Reply #2 on: 10 Dec 2007, 03:23:19 »
Missing bracket at the eng of cfgvehicle classes? If that's it, I swear I'm going to kick myself. Thanks for your help :)

*Edit*

It didn't work   :dunno: :no:
Dunno what to do from here...
« Last Edit: 11 Dec 2007, 04:13:57 by Lurchisme »
? (Newbiefactor == 1) && (Spammfactor == 1) : UserTroll = True; Player join objnull

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Config help
« Reply #3 on: 12 Dec 2007, 00:23:18 »
Well, the config isn't quite right.


1./    class CfgPatches only list one of your cfgVehicle classes, "Tomahawk_Launcher", "Tomahawk" is not listed.

2./    The class CfgVehicleClasses need to be closed.

3./    You have class DPD_Launcher inheriting from class Fortress1:

        Class DPD_Launcher : Fortress1 {};

Then you have 'class Tomahawk_Launcher' inheriting from class DPD_Launcher.
Is there any definition for DPD_Launcher elsewhere?

4./    After this you have closed the cfgVehicles section, so the following definition for class TomaHawk will not be included in cfgVehicles........not sure what it will be under, it might even be ignored.

5./    Next you have class DPD_Missiles inheriting from class Plane:

        class DPD_Missiles : Plane

This needs to be closed thus:

        class DPD_Missiles : Plane {};

Then you have class TomaHawk inheriting from class DPD_Missiles.
Is there any definition for DPD_Missiles elsewhere?

I'm not sure if TomaHawk is supposed to be an actual missile, if so, I would think it better to configure it under cfgAmmo and/or cfgMagazines rather than cfgVehicles.


Planck
I know a little about a lot, and a lot about a little.

Offline Lurchisme

  • Members
  • *
  • I'm supposed to write something here, right?
Re: Config help
« Reply #4 on: 12 Dec 2007, 08:18:19 »
Thanks for your help Planck :)

I played around with the config last night (copied someone elses, cut out everything I could till it worked, then built it up) and finally got it working. In the process, fixed most of the bugs you pointed out. Your post is still good though, since up till now I didn't know why it wasn't working... now I do.

And your right, classing the Tomahawk under ammo would be better. I originally had it listed as a subclass of 'Fortress1' as well, and didn't understand why it wasn't moving...

Now I just got to turn it around so it doesn't fly backwards, increase the size a bit so it matches real-world tomahawks and texture it... And then get onto Harpoon missiles, Sparrow missiles and all the rest. Thanks for your help :)
? (Newbiefactor == 1) && (Spammfactor == 1) : UserTroll = True; Player join objnull

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Config help
« Reply #5 on: 30 Jan 2008, 17:51:40 »
Consider the following "tips":

- If possible, missile object should be configured as ammo (as Planck pointed out).
- Missiles like Sparrow have a "short" thrusted period following by a longer "thrustless" guidance. This is already considered and suppoted by mando missile system, you only need to make sure the object you create doesnt start any internal engine by its own.
- Ammo classes in ArmA have life-times, once these times elapse, the objects are removed automatically by ArmA. For example, a Sidewinder object has a lifetime of about 15 seconds. Consider this when you create your missiles, give them enough life-time to keep them alive and "not-deleted" at least for the desired ammount of seconds for each missile type.