Error while compiling ***: 'HumanNPC' does not contain a definition for ***
Error while compiling RealPVE: 'HumanNPC' does not contain a definition for 'skinID' and no accessible extension method 'skinID' accepting a first argument of type 'HumanNPC' could be found (are you missing a using directive or an assembly reference?) | Line: 2606, Pos: 19

Hello everyone. I want to share how to solve this problem. In my plugin, I use the HumanNPC class from the game itself. There are no issues when loading/unloading my plugin or the HumanNPC plugins. However, when starting/restarting the server, my plugin doesn't load due to an error, as the compiler thinks I am referring to the HumanNPC plugin class. To avoid this problem, you need to add "global::"

Before:

object OnNpcTarget(HumanNPC npc, BasePlayer target)

After:

object OnNpcTarget(global::HumanNPC npc, BasePlayer target)

I'm not sure if the HumanNPC plugin was created before or after the appearance of the HumanNPC class in the game itself, but I ask others not to create classes/plugins with similar names to those in the game, so that others don't have problems because of you. Thank you for your attention!

Yes in your plugin you would need to add

global::HumanNPC ​