Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects After Effects expression “Expecting: ;” or “Expecting: )”error.

  • After Effects expression “Expecting: ;” or “Expecting: )”error.

    Posted by Emirhan Solmaz on October 31, 2014 at 11:56 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]

    Emirhan Solmaz replied 11 years, 10 months ago 3 Members · 3 Replies
  • 3 Replies
  • Brian Charles

    October 31, 2014 at 5:54 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.

  • Kevin Camp

    October 31, 2014 at 9:24 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

  • Emirhan Solmaz

    November 1, 2014 at 11:33 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.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy