Basically, I am just trying to increase the stats of a specific troops magic defense by a variable I just want to know if I am coding this correctly:
$gameTroop.members().addparam(5, $gameVariables[26]) is the script I'm using to change the magic defense of troop #1 by variable 25
Your question is a little hard to understand - you seem to be mixing up the terminology between "Troop" and "Enemy."
Aside from that, and what Toby already pointed out, you also have the wrong syntax for the variable. There's no such thing as $gameVariables[26] - where did you find that syntax?
The value of a variable is $gameVariables.value(26)
What both of them are trying to tell you is that $gameVariables per se is NOT an array, thus you can't access its data via an array's index [1] as you first intended.
The same principle is valid for $gameSwitches.
How do you access the values then? TobyYasha already took care of that.
The problem is that you didn't change the "Don't Run" condition, meaning nothing gets executed.
You should change it to something like "Turn 0" or any other condition that you see fit.