ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

After Effects expression "Expecting: ;" or "Expecting: )"error.

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
emirhan solmazAfter Effects expression "Expecting: ;" or "Expecting: )"error.
by on Oct 31, 2014 at 11:56:01 am

i take the error for first else loop which is in line 6 in my After Effects. if there is more error in code i dont know its because i cant pass 6.line. help please.

A = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);

if (A< 20) {y =A/4}

else {
if(A<40) {y=3A/4} else {
if(A<60) {y=A/2} else {
if(A<80) {y=(3A-40)/2} else {
if(A<100) {y=3A/4} else{y=(5A-200)/4} }}}};


[y,y]


Return to posts index

Brian CharlesRe: After Effects expression "Expecting: ;" or "Expecting: )"error.
by on Oct 31, 2014 at 5:54:57 pm
Last Edited By Brian Charles on Oct 31, 2014 at 8:24:03 pm

What exactly are you trying to achieve with this code?

It looks like time remapping but results in a 2 dimensional array – time remapping needs a single value, not 2.

What is 3A, it is never defined in the expression?

Could a switch statement better serve your requirements.



Return to posts index


Kevin CampRe: After Effects expression "Expecting: ;" or "Expecting: )"error.
by on Oct 31, 2014 at 9:24:00 pm

yep, the problem is 3A... i think you may have meant 3*A..?

also you could use 'else if' statements which would simplify your expression a little.

A = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);

if (A<20) y =A/4;
else if(A<40) y=3*A/4;
else if(A<60) y=A/2;
else if(A<80) y=(3*A-40)/2;
else if(A<100) y=3*A/4;
else y=(5*A-200)/4;

[y,y]


Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index


emirhan solmazRe: After Effects expression "Expecting: ;" or "Expecting: )"error.
by on Nov 1, 2014 at 11:33:47 pm

Thx for the answers and yes the problem was "3A". it should be 3*A. And "Brian", it wasn't a time remaping. it was scale remaping. i want my object scale with a graphic. and i find the answer in 5 min after i post problem here. Then i want write solutuion to here but i cant find the topic. Thx anyway. you are helping people and i respect that.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]