The GetIsEffectValid() NWScript command is used to test whether or not the specified effect is a valid effect that was applied to an object. This is almost exclusively used in loops that make use of GetFirstEffect() and GetNextEffect().
Definition
int GetIsEffectValid (effect eEffect)
effect eEffect- The effect to be tested.
This command will return TRUE or FALSE. A script using this command will typically contain statements like the following.
effect eSearch = GetFirstEffect(oTarget);
while ( GetIsEffectValid(eSearch) )
{
// Do something.
// Update the loop.
eSearch = GetNextEffect(oTarget);
}