OFPEC Forum

Addons & Mods Depot => ArmA - Addons & Mods Discussion => Topic started by: Ding on 22 Aug 2007, 22:40:57

Title: Config Help!
Post by: Ding on 22 Aug 2007, 22:40:57
I've just downloaded the new tools and made a crate addon, my only problem is configing it, I just wanted a simple config but I cant seem to get it to work i always get an error every time I start Arma telling me theres a C encountered instead of { on line 21 of CfgVehicles. This is pretty simple stuff can anyone tell me how to get this static object into Arma?


Code: [Select]
class CfgPatches
{
class nikcrate
{
units[] = {nikcrate};
weapons[] = {};
requiredVersion = 0.01;
};
};

class CfgVehicleClasses
{
class NikCrates
{
displayName = "Nik Crates";
};
};

class CfgVehicles
{
class all
class static: all
class building: static
class nonstrategic: building
class nikcrate: nonstrategic
{
model="\cratetest\crate";
vehicleclass="NikCrates";
armor=15000;
scope=2;
displayname="nik crate";
};
};
Title: Re: Config Help!
Post by: Planck on 23 Aug 2007, 00:53:41
the way you have it is pretty much the way OFP configs inherited, but there are a few bits missing......try:

Code: [Select]
class CfgVehicles
{
class all {};
class static: all {};
class building: static {};
class nonstrategic: building {};
class nikcrate: nonstrategic
{
model="\cratetest\crate";
vehicleclass="NikCrates";
armor=15000;
scope=2;
displayname="nik crate";
};
};

or the ArmA way....

Code: [Select]
class CfgVehicles
{
class nonstrategic;
class nikcrate: nonstrategic
{
model="\cratetest\crate";
vehicleclass="NikCrates";
armor=15000;
scope=2;
displayname="nik crate";
};
};

At least I hope that works ok for you, try both.   ::)


Planck
Title: Re: Config Help!
Post by: Ding on 23 Aug 2007, 09:17:07
Thanks plant, I used the latter and it worked perfectly. I need to get used to the differences in configs for OFP and Arma addons