MV "VE - Sprite in Windows" + "SRDude Stat Distribution" Plugins

Hello everyone,

I am trying to use the Victor Engine's Sprite in Windows plugin with SRDude's Stat Distruibution plugin.

Now, the help file in the Sprite in Windows plugin states:
- Adding Sprites on windows.
To add a battler sprite, you need to add the following code on the window.
The codes should be placed on the part of the code that draws the window
information, this vary from window to window, so I can't say exactly where
you must place it. You will have to find out by your own.
So, I was hoping it would be as simple as adding Victor Engine's provided example code:

JavaScript:
 var actor = $gameParty.members()[index];
 var mode  = 'active';
 var x = this.x + 64;
 var y = this.y + 96;
 this.drawBattlerSprite(actor, x, y, mode, index);

However, I am not 100% sure where to add this code to SRDude's. I've tried entering the code in various places, but I usually end up with "ReferenceError: index is not defined."

Any help would be appreciated!

Original thread: https://forums.rpgmakerweb.com/threads/ve-sprite-in-windows-srdude-stat-distribution-plugins.154104/