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

what is the problem ?

New Here ,
Dec 10, 2021 Dec 10, 2021

Screenshot (79).png

TOPICS
Error or problem , Expressions
441
Translate
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

Translate
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

Translate
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

can u write the expressions in write way, pls ? 

 

Translate
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

can you write the expression in the right form ?

Translate
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

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

Translate
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
LATEST

it worked well wheni changed it to legacy extended script

Translate
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