Home   Help Search Login Register  

Author Topic: CfgVehicles error..  (Read 1349 times)

0 Members and 1 Guest are viewing this topic.

Offline RM Snipe

  • Members
  • *
  • RM kicks butt!
CfgVehicles error..
« on: 07 Mar 2004, 04:09:38 »
Hi, I am getting the following error........

'mortar81\config.cpp/CfgVehicles/mortar81.': ':' encountered instead of '='

WTF is wrong with CPP ??????????? I cant find it,maybe one of you code wizards can see my mistake......

CPP is attached below.........

Rastavovich

  • Guest
Re:CfgVehicles error..
« Reply #1 on: 07 Mar 2004, 12:28:41 »
Your error should be caused by a
":" instead of an ";"
after the closing } of the mortar81 definition (right before the class mortar81Tripod).

I also noticed a missing ; after hasgunner=false
in class mortar81Tripod

Offline RM Snipe

  • Members
  • *
  • RM kicks butt!
Re:CfgVehicles error..
« Reply #2 on: 08 Mar 2004, 03:49:49 »
Thanks Rastavovich its been driving me nuts for last week.

There is a 81mm mortar in editor now. But I when click preview game locks on get ready screen, What now,arghh ??

Is the Cfgpatches ok ? Do I need for e.g. mortar81WpnTripod in weapons & other Cfgweps too. ?

class CfgPatches
{
   class mortar81
   {
      units[] ={};
                                weapons[] ={};
      vehicles[]={mortar81};
      requiredVersion = 1.90;
      requiredAddons[]={};
      
   };
};

Are there Cfg classes missing for this type of addon I need to add ?



Rastavovich

  • Guest
Re:CfgVehicles error..
« Reply #3 on: 08 Mar 2004, 10:44:42 »
Your config should have those entries:
Code: [Select]
class CfgPatches
{
   class mortar81
   {
      units[] ={mortar81,mortar81Tripod};
                weapons[] ={mortar81,mortar81WpnTripod,mortar81Dummy};
      vehicles[]={};
      requiredVersion = 1.90;
      requiredAddons[]=
      {
         BIS_resistance,BIS_WeaponPack,BMP2,MM1,6g30,Kolo;
      };
   };
};
class CfgModels
{
   class Default {};
   class Vehicle: Default {};
   class Tank: Vehicle {};
   class mortar : Tank {};  //modelname without .p3d ending
   class weapon : default {};
   class mortar_tripod : weapon {};  //modelname without .p3d ending
};

BTW, you should tag your classes and the models aswell... See how and why here:http://www.ofpec.com/tags_about.php

Offline RM Snipe

  • Members
  • *
  • RM kicks butt!
Re:CfgVehicles error..
« Reply #4 on: 08 Mar 2004, 18:04:32 »
Hi Rastavovich, tried what you suggested but still crashing to desktop on clicking preview in editor or at get ready screen  :'(  .    Will keep trying,thanks again for your help so far mate.......Snipe.





Rastavovich

  • Guest
Re:CfgVehicles error..
« Reply #5 on: 09 Mar 2004, 09:28:26 »
I looked through your config again and noticed that you store the models in an subfolder inside the .pbo.... IIRC that is not allowed by game engine.

Try to simply place where the config is placed. That might solve it.

BTW: of course every model used should be defined in CfgModels.


Leone

  • Guest
Re:CfgVehicles error..
« Reply #6 on: 09 Mar 2004, 13:02:15 »
No, that's not true. Models in sub-folders is fine  ;D