There is a typo on the api:
bool CanNpcAttack(BaseNpc npc, BaseEntity target)
{
Puts("CanNpcAttack works!");
reture true;
}should be return true;Link to the mistake [Click Here]