OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: RM Snipe 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.........
-
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
-
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 ?
-
Your config should have those entries:
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 (http://www.ofpec.com/tags_about.php)
-
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.
-
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.
-
No, that's not true. Models in sub-folders is fine ;D