Troop Events script call not working

So I've programmed a conditional branch script that displays a picture on screen if an actor is in the party.

First, it checks the position of the actor within the party, e.g, for Party leader;

Code:
If : Script : $gameActors.actor(1) === $gameParty.leader()

and party member 1

Code:
If : Script : $gameActors.actor(1) === $gameParty.members()[1]

And then it shows a picture if the condition is true.

I'm trying to do the same for Enemies in the battle troop but it doesn't seem to be functioning. Here is the code:

Code:
If : Script : $gameEnemies.enemy(21) === $gameTroop.members()[1]

Why does the above script not function?
$gameTroop.members()[1].enemy === $dataEnemies[1]

there is no $gameEnemies object
Thanks, feel like I'm feeling my way around in the dark with some of these script calls because a lot of them don't seem to be listed on any list.

Unrelated, but what is the designation for Actor that is currently selected/whose turn it is in battle in script form? Can't seem to find that easily either.
$gameTroop.members()[1].enemy === $dataEnemies[1]

I've just tried to use this script and many different variations and it doesn't seem to function
Unrelated
if it's unrelated, you should report this thread to be closed and start a new one.
I've just tried to use this script and many different variations and it doesn't seem to function
then show us a screenshot of how and where you're using that script. It can only be used during battlescreen, and a lot of people misunderstand how to trigger and control troop events
is the syntax correct, tho?
I'm not a JS expert.... I just eyeballed it there.

Original thread: https://forums.rpgmakerweb.com/threads/troop-events-script-call-not-working.100763/