Jump to content

Weapon Mod Slots Issue

Pending 1.6.6

dustyhansen
dustyhansen

Posted

In short, players are able to drag non-attachment items (such as other weapons) onto their weapon and add them as attachments. For example, a player can add an L9 as an attachment to their Spas shotgun.

Players will often get kicked from the server when they do this, but not always. We assume it is a Skill Tree issue because of the messages in console. Also, we don't have any other plugins that deal with attachments to weapons.

This is what shows in the console when you move non-weapon items in and out of the slot:

Failed to call internal hook 'OnWeaponModChange' on plugin 'SkillTree v1.6.5' [3526322469] (Specified cast is not valid.)
at bool System.Linq.Enumerable+<CastIterator>d__34<ProjectileWeaponMod>.MoveNext()
at bool System.Linq.Enumerable+WhereSelectEnumerableIterator<ProjectileWeaponMod, ProjectileWeaponMod+Modifier>.MoveNext()
at bool System.Linq.Enumerable+WhereSelectEnumerableIterator<ProjectileWeaponMod+Modifier, float>.MoveNext()
at float ProjectileWeaponMod.Mult(BaseEntity parentEnt, Func<ProjectileWeaponMod, Modifier> selector_modifier, Func<Modifier, float> selector_value, float def)
at object Oxide.Plugins.SkillTree.OnWeaponModChange(BaseProjectile weapon, BasePlayer player) in /home/container/carbon/plugins/SkillTree.cs:line 5053
at object Oxide.Plugins.SkillTree.InternalCallHook(uint hook, object[] args) in SkillTree.cs/Internal:line 3490

This is what shows when a normal player tries to switch to the weapon and is kicked:

76561198328184183/Milfred disconnecting: Exception (cs:121126): InvalidCastException: Unable to cast object of type 'BaseProjectile' to type 'ProjectileWeaponMod'. System.Linq.Enumerable+<CastIterator>d__99`1[TResult].MoveNext () (at <00000000000000000000000000000000>:0) System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <00000000000000000000000000000000>:0) ProjectileWeaponMod.%e97ee2f42b014343a847faccb7e866ee3672cab9 (BaseEntity %602b89eb68e2da029564183e450e7fbe46a471e2) (at <00000000000000000000000000000000>:0) BaseProjectile.%9c171f574c3171d064df8c9b0cc68ee18fd84756 () (at <00000000000000000000000000000000>:0) BaseProjectile.OnInput () (at <00000000000000000000000000000000>:0) BasePlayer.%fdb4d5f163905f9c5ac368e39c0de2cebde125af () (at <00000000000000000000000000000000>:0) BasePlayer.%7e3232be8c058495865960ac821cb4feabca0270 (%689054bdda2cd5367a8b1aa242d98104ddbc61df %d9278f1a0ba057d22e1160572148abd4c039dd0d, System.Single %b2bb7e75f05388c3b7434a6a5203f04f48795405) (at <00000000000000000000000000000000>:0) BasePlayer.ClientUpdateLocalPlayer (System.Single %10a1213f0e559fd78592446f75cb9f475d7f9db9) (at <00000000000000000000000000000000>:0) BasePlayer.%2a195ce9264160a1e36a08914084c352c972e349 (System.Single %10a1213f0e559fd78592446f75cb9f475d7f9db9) (at <00000000000000000000000000000000>:0) Client.Update () (at <00000000000000000000000000000000>:0)

 

weaponmod_3.png

weaponmod_2.png

weaponmod.png

dustyhansen

Posted

I have a video too, but no room on here to upload it.

imthenewguy

Posted

Its not a skill tree issue. Skill tree throws the error because it cant process what you just added.

1.8m

Downloads

Total number of downloads.

8.4k

Customers

Total customers served.

126.5k

Files Sold

Total number of files sold.

2.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.