Type `HumanNPC' does not contain a definition for `currentTarget'Error

Downloaded latest version and am getting this error...

20:32 [Error] Error while compiling: AdminRadar.cs(2008,32): error CS1061: Type `HumanNPC' does not contain a definition for `currentTarget' and no extension method `currentTarget' of type `HumanNPC' could be found. Are you missing an assembly reference?

Commented out the code so it just returns NULL and it started working again.

private BasePlayer GetVictim(BaseEntity entity)
{
/*if (entity is global::HumanNPC)
{
var npc = entity as global::HumanNPC;

return npc.GetBestTarget() as BasePlayer;
}*/
/*else if (entity is BaseAnimalNPC) // brain must be exposed
{
var npc = entity as BaseAnimalNPC;

foreach (var target in npc.brain.Senses.Players)
{
return target as BasePlayer;
}
}*/

return null;
}

heya. this error is not in the latest version so you might've downloaded the latest version, but you did not install it to start with. it seems like you installed it after you edited the file, though. download it again and reinstall.

currentTarget was removed in 5.1.5 over 3 months ago =)

The file I'm downloading from this webiste and that is on our server reporting the error is ...

namespace Oxide.Plugins
{
    [Info("Admin Radar", "nivex", "5.1.7")]

do oxide.plugins in your console

nivex

heya. this error is not in the latest version so you might've downloaded the latest version, but you did not install it to start with. it seems like you installed it after you edited the file, though. download it again and reinstall.

currentTarget was removed in 5.1.5 over 3 months ago =)

Could be that the HumanNPC plugin is installed, in which case you may need to reference Rust's code using global:: instead of letting the compiler assume.

there is no such code for currentTarget in 5.1.7. it is not possible for 5.1.7 to be running on your server. if so then you would not have this error.

type:
o.unload AdminRadar
delete AdminRadar.cs
reinstall 5.1.7 again


and global::HumanNPC is used already :)

nivex

and global::HumanNPC is used already :)

Figured, I wasn't able to peek on mobile at the time. :P