You'll have to check for the active pokemon through events. The way you have it set up now is that PCurrentHP is be given a value of "Slot = 1 ? PlayerPokemon.At(S1, 4) : Slot = 2 ? PlayerPokemon.At(S2, 4) : Slot = 3 ?, etc, etc."
Instead you have use events that compare Global Variable for which pokemon is active and THEN set the value of PCurrentHP to "PlayerPokemon.At(S?, 4)"
You could also try set value of PCurrentHP to "PlayerPokemon.At(s&(whatever the slot variable you're using is called), 4)" I've not tried doing it this way, but I don't see why it wouldn't work. The previous method should work 100% though.
Hope this helps