Friends have function findEnemies, but the program throws an error

According to the Thang editor, most or all or the commandable thangs have the function findEnemies(). However, when I try to use it in Kelvintaph Crusader, or any other level, for that matter, it fails to trigger and throws an error. Why is this?

Not sure; I use it all the time. Can you share a code example that exhibits the problem?