Copy link to clipboard
Copied
Hi, I'm using a simple expression and I'm getting this error.
This is the code:
var x = value[0];
var a = thisComp.height/2;
var f = .5;
var y = Math.sin(time*2*Math.Pi*f)*a;
[x,y]
I watched a YouTube tutorial that used this same code (without using var) and it seemed to work, but not to me.
you should right PI instead of Pi so try this:
var x = value[0];
var a = thisComp.height/2;
var f = .5;
var y = Math.sin(time*2*Math.PI*f)*a;
[x,y]
Copy link to clipboard
Copied
you should right PI instead of Pi so try this:
var x = value[0];
var a = thisComp.height/2;
var f = .5;
var y = Math.sin(time*2*Math.PI*f)*a;
[x,y]
Copy link to clipboard
Copied
Thanks, it worked!
Why did it say it was error in line 1 and maked x instead telling me I misspelled PI? Weird...
Copy link to clipboard
Copied
Yes, the error system in AE still not smart enough to fix the error
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more