SilverRanger 11 Posted February 27, 2011 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
ww2weasel 10 Posted February 28, 2011 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
SilverRanger 11 Posted February 28, 2011 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
rellikki 7 Posted February 28, 2011 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
SilverRanger 11 Posted February 28, 2011 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
ww2weasel 10 Posted February 28, 2011 Lol's happens to everyone every now and again.... Share this post Link to post Share on other sites