KeyNotFoundException at OnReloadWeaponFixed
Failed to call hook 'OnReloadWeapon' on plugin 'FirearmModifier v1.0.7' (KeyNotFoundException: The given key was not present in the dictionary.)
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <fb001e01371b4adca20013e0ac763896>:0 
  at Oxide.Plugins.FirearmModifier.OnReloadWeapon (BasePlayer player, BaseProjectile projectile) [0x00011] in <66c4f0dc712c4ebf83b1bf9bab1e14ef>:0 
  at Oxide.Plugins.FirearmModifier.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00122] in <66c4f0dc712c4ebf83b1bf9bab1e14ef>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <80b90e8213db44b29ec2d4111764172c>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ec05e0208c9149bba43236ca58fea105>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ec05e0208c9149bba43236ca58fea105>:0

Just noticed this in console this morning.

Do you have crafting controller installed?

No. I saw that in the documentation and double checked. I was running it at one point. But made sure it was removed.

I did reload it and it's working again. I guess it was just a hiccup.

My plugin will not work with the crafting controller at all. The simple mode works but it's iffy and may not be reliable still. If the crafting controller was running at all you need to remove it completely and reboot your server for it not to bog out Firearm Modifier.

I had removed it a while back since it had a conflict with ZLevels. I meant I had to double check just in case I had uploaded it back to the server by mistake when I did the machine transfer after the harddrive failure. But I was good and didn't screw up :)

Aye, I just figured it out. So AdminMenu is forgetting who has perms apparently. 

You will need to reload AdminMenu after the server reboots I guess. I'll push an update to check for it. To stop the console error. But there is nothing I can do about that plugin issue. I can now work on a Crafting Controller patch and try again with compatibility. 

Think I fixed that reload error possibly maybe? Keep me posted.
Will do. And by the way. Thank you for making this plugin. Been missing something like this for a while now. Last one I used was really unstable.

I looked at the documentation. I do not have any sort of crafting plugin installed

Failed to call hook 'OnReloadWeapon' on plugin 'FirearmModifier v1.0.8' (KeyNotFoundException: The given key was not present in the dictionary.) at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <fb001e01371b4adca20013e0ac763896>:0
at Oxide.Plugins.FirearmModifier.OnReloadWeapon (BasePlayer player, BaseProjectile projectile) [0x00011] in <cefb368a8b6d424888710932573d3a3f>:0
at Oxide.Plugins.FirearmModifier.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00122] in <cefb368a8b6d424888710932573d3a3f>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <80b90e8213db44b29ec2d4111764172c>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ec05e0208c9149bba43236ca58fea105>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ec05e0208c9149bba43236ca58fea105>:0

Please try the latest update.

Keep in mind players can only have 1 or the other permission, not both. Since they are 2 different config options.

So .use is 1 config setting option 
.VIP is a second config option

The plugin will now throw a warning with players that happen to have both of these permissions applied to them.

I updated the plugin and it seemed to fix the issue. Thank you very much
(13:56:37) | Failed to call hook 'OnReloadWeapon' on plugin 'FirearmModifier v1.0.9' (KeyNotFoundException: The given key was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <fb001e01371b4adca20013e0ac763896>:0
at Oxide.Plugins.FirearmModifier.OnReloadWeapon (BasePlayer player, BaseProjectile projectile) [0x00011] in <9c50b3cf7b2f4c48996301c36f090082>:0
at Oxide.Plugins.FirearmModifier.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00122] in <9c50b3cf7b2f4c48996301c36f090082>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <80b90e8213db44b29ec2d4111764172c>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ec05e0208c9149bba43236ca58fea105>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ec05e0208c9149bba43236ca58fea105>:0

try deleting everything lang file, config, plugin, datafile double-check that no other plugin is installed that modifies weapons like weapon changer, etc. 
download a fresh copy and try applying either permission .use or .VIP should work (not both)

not sure how this is occurring since it doesn't show up in my testing 

Error is coming from not checking if the key exists, hence the exception.

WeaponOption weaponOptions = config.WeaponOptions[projectile.ShortPrefabName];

There's no check for that key above, you're just assuming it exists. So the real issue is... why doesn't it exist?

Please update, should be resolved now, thanks
5fc3e3496bad7.png khan
Please update, should be resolved now, thanks

(14:56:43) | Failed to call hook 'OnReloadWeapon' on plugin 'FirearmModifier v1.0.91' (KeyNotFoundException: The given key was not present in the dictionary.)

at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <fb001e01371b4adca20013e0ac763896>:0

at Oxide.Plugins.FirearmModifier.OnReloadWeapon (BasePlayer player, BaseProjectile projectile) [0x00011] in <b759b36e6e9b48b5a113c5f1a38b1ba4>:0

at Oxide.Plugins.FirearmModifier.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00122] in <b759b36e6e9b48b5a113c5f1a38b1ba4>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <80b90e8213db44b29ec2d4111764172c>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ec05e0208c9149bba43236ca58fea105>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ec05e0208c9149bba43236ca58fea105>:0

(14:56:48) | [Death Notes] unknown owner's Auto Turret did its job, killing [PITUS] BabyJesus69.

(14:56:48) | [PITUS] BabyJesus69[283276/76561############] was killed by autoturret_deployed (entity)

(14:56:51) | [Better Chat] [Team] [PITUS] Loles: inside only

(14:56:54) | [PrivateMessages] [PM]Jade->YouthGoneWild:Could I tp to you to build a base over there?

(14:56:56) | [PITUS] BabyJesus69[283276/76561############] has spawned

(14:57:03) | [Weapon Trajectory] rocket_fire

(14:57:05) | Failed to call hook 'OnReloadWeapon' on plugin 'FirearmModifier v1.0.91' (KeyNotFoundException: The given key was not present in the dictionary.)

at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <fb001e01371b4adca20013e0ac763896>:0

at Oxide.Plugins.FirearmModifier.OnReloadWeapon (BasePlayer player, BaseProjectile projectile) [0x00011] in <b759b36e6e9b48b5a113c5f1a38b1ba4>:0

at Oxide.Plugins.FirearmModifier.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00122] in <b759b36e6e9b48b5a113c5f1a38b1ba4>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <80b90e8213db44b29ec2d4111764172c>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ec05e0208c9149bba43236ca58fea105>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ec05e0208c9149bba43236ca58fea105>:0



updated spamming more actually now im not sure what is causeing this honestly it seems to be random
Locked automatically