-
After Effects warning: invalid numeric result (divide by zero?) Expression disabled.
I have been having a problem with an expression that is getting extremely frustrating. It is an expression that I have used on countless other projects with no problem, but for some reason, on this one specific project, it keeps giving me this error:
After Effects warning: invalid numeric result (divide by zero?)
Expression disabled.The expression is being used on the scale property of about 50 or so layers. The expression that I am using is as follows:
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n–;
}
}
if (n == 0){
t = 0;
}else{
t = time – key(n).time;
}if (n > 0){
v = velocityAtTime(key(n).time – thisComp.frameDuration/10);
amp = .05;
freq = 2.0;
decay = 10.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}I have tried changing the values of amp, freq, and decay to no avail. If anyone can offer any help or insight into this problem it would be greatly appreciated.