Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression error: unclosed token, have no idea what it is

  • Expression error: unclosed token, have no idea what it is

    Posted by David Cabestany on August 9, 2017 at 10:46 pm

    I’m getting the following error:

    Unclosed token

    when applying the expression below, have no idea what it means and can’t seem to fix it, can anyone help?

    Thanks in advance.

    t=time;

    if
    (t>=5.75 && <6.2)
    {
    random(-3,3)
    }
    else
    0
    ;

    Ben Robinson replied 8 years, 5 months ago 2 Members · 4 Replies
  • 4 Replies
  • David Cabestany

    August 9, 2017 at 11:01 pm

    Nevermind, I know why.

  • Ben Robinson

    November 13, 2017 at 2:39 pm

    What was the answer to this? I’m getting a similar error, but can’t work out why…?

  • David Cabestany

    November 13, 2017 at 3:10 pm

    You need to specify the property or variable in the conditional for both the first and second statements (I’m not sure if those are the names of the parts of the expression), so in my example instead of

    (t<=5.75 && <6.2)

    it should be

    (t<=5.75 && t<6.2)

    Hope this helps.
    D.

  • Ben Robinson

    November 13, 2017 at 9:01 pm

    Awesome! Thank you. I don’t think I’ve used the && statement before–so obviously wasn’t aware of the syntax.

    Thanks for your help.

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