• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

what is the problem ?

New Here ,
Dec 10, 2021 Dec 10, 2021

Copy link to clipboard

Copied

Screenshot (79).png

TOPICS
Error or problem , Expressions

Views

370

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 10, 2021 Dec 10, 2021

You should use the if-else in the proper way, like the one below
If () {
} else {
}
or if you want to keep using it in the old way you should change the expression settings to a legacy from the project settingsScreen Shot 2021-12-11 at 10.25.37 AM.png

Votes

Translate

Translate
Community Expert ,
Dec 10, 2021 Dec 10, 2021

Copy link to clipboard

Copied

You should use the if-else in the proper way, like the one below
If () {
} else {
}
or if you want to keep using it in the old way you should change the expression settings to a legacy from the project settingsScreen Shot 2021-12-11 at 10.25.37 AM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2021 Dec 11, 2021

Copy link to clipboard

Copied

can u write the expressions in write way, pls ? 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2021 Dec 11, 2021

Copy link to clipboard

Copied

can you write the expression in the right form ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 11, 2021 Dec 11, 2021

Copy link to clipboard

Copied

I think OussK is suggesting this approach:

If (textIndex % 2) {
//do something
} else {
// do something else
}

The trouble with Javascript is that (quite often), you can take shortcuts with your code.  Personally, I find these make it much harder to debug, unless you're familiar with the coding style.  By spelling everything out more, it is easier for someone else to identify what's going on.

As far as I know, AE should have been able to process the original line, but it couldn't so the solution above should work. 

Or as OousK also suggested, it might be the project's Expression Engine, which you can find in File > Project Settings

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2021 Dec 11, 2021

Copy link to clipboard

Copied

LATEST

it worked well wheni changed it to legacy extended script

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines