AE expression error (can't find solution in forum)
I know very little about AE and am not delusional about being able to learn it all quickly. That's why I'm grateful for a site I found with the expressions I needed to just copy and paste. Their Wiggle expression worked great, but I'm having trouble with their Squash and Stretch expression. Here is what they provide, copied and pasted exactly:
maxDev = 13; // max deviation in pixels
spd = 30; //speed of oscillation
decay = 1.0; //how fast it slows down
t = time - inPoint;
x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
y = scale[0]*scale[1]/x;See the screenshot for the error I'm getting:

I have searched this forum already, and plenty of new users have seen this error. The common solutions I've read so far are:
- Use "square" brackets instead of parentheses, but... there aren't any parentheses at all in Line 1. ??? (I've tried, for fun, inserting brackets in various ways to see if something worked or blew up. Neither.)
- The expression is full of typos. This may well be the case, I'd have no way of knowing, not really understanding what the expression means. Like I said, I'm grateful for copy and paste at this point, until I can learn what I need as I go. I did notice that in Line 1, there is an extra space before the word max, after the two slashes. I tried deleting it but it made no difference.
I also read somewhere that the expression engine has changed, and expressions that used to work no longer do. I suspect this is the problem. The page I copied the expression from was written in 2017, and I'm using the latest AE (updated approximately a week ago). I have a feeling this expression used to work and doesn't anymore.
Can anyone help me fix it? Thanks in advance!
