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

Error: Couldn't turn result into numeric value

Explorer ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

Hi, I'm using a simple expression and I'm getting this error.

error.jpg

 

This is the code:

var x = value[0];
var a = thisComp.height/2;
var f = .5;
var y = Math.sin(time*2*Math.Pi*f)*a;

[x,y]

 

I watched a YouTube tutorial that used this same code (without using var) and it seemed to work, but not to me.

MARIANCE
TOPICS
Error or problem , Expressions

Views

4.3K

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 , Mar 05, 2021 Mar 05, 2021

you should right PI instead of Pi so try this:

 

var x = value[0];

var a = thisComp.height/2;

var f = .5;

var y = Math.sin(time*2*Math.PI*f)*a;

[x,y]

 

 

Votes

Translate

Translate
Community Expert ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

you should right PI instead of Pi so try this:

 

var x = value[0];

var a = thisComp.height/2;

var f = .5;

var y = Math.sin(time*2*Math.PI*f)*a;

[x,y]

 

 

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
Explorer ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

Thanks, it worked!

Why did it say it was error in line 1 and maked x instead telling me I misspelled PI? Weird...

MARIANCE

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 ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

LATEST

Yes, the error system in AE still not smart enough to fix the error 

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