Jump to content
Sign in to follow this  
SilverRanger

custom "THROW" problem

Recommended Posts

I'm trying to separate the grenade throwing action by adding 2 new "throw" weapons, one for hand-grenades and one for smoke-grenades. this is my config

class CfgWeapons
{
class Default {};
class GrenadeLauncher:Default {};
class Throw:GrenadeLauncher {};
class ThrowGrenade:Throw
{
magazines[]={"HandGrenade"};
};

class ThrowSmoke:Throw
{
magazines[]={"SmokeShell","SmokeShellRed","SmokeShellGreen"};
};
};

the problem is that when I try to add either one of the weapons to a unit, I get an error saying the weapon is not defined

I copy pasted this into another completed config, and it worked fine. what am I missing?:confused:

Share this post


Link to post
Share on other sites

Does the completed config have handgrenades defined in ammo class where your config does not?

Share this post


Link to post
Share on other sites

No, it doesn't, but I don't think it's necessary to define the grenades again as they are already defined inside the BIS config.cpp. Besides, the error message says the weapon class is not defined...

I'm probably making a stupid mistake somewhere, but I just can see it :confused_o:

Share this post


Link to post
Share on other sites

Is that the whole config? It should have CfgPatches at the beginning. It can be as simple as this:

class CfgPatches
{
class yourAddonName
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.96;
   		requiredaddons[] = {};
};
};

Share this post


Link to post
Share on other sites

thanks for the replies

it appears my stupidity has wasted everyone's time :(

I forgot to add the damn cfgPatches :banghead: :banghead: :banghead:

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  

×