Check for object type, `A constant value is expected`Solved

This block of code has stopped working:

bool IsHuman(UnityEngine.Object subject) {
	bool result = true;

	if ((subject is NPCMurderer) || (subject is NPCPlayer) || (subject is HTNPlayer)) {
		result = false;
	}

	return result;
}​

The error is `A constant value is expected` on the line `result = false` in the condition.

This has worked for quite sometime and stopped working maybe two months ago.

Any help to get this working again greatly appreciated.

 

NPCMurderer and HTNPlayer no longer exist so they would have to be removed.

Thanks very much - worked perfectly :D

Locked automatically