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

Expression shows error

Contributor ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

Hello,

I am following one tutorial 'VERBATIM'. I applied the same expression as my tutor used. but he got no error, I got. :'( why?

 

my comp.gif

TOPICS
User interface or workspaces

Views

300

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 07, 2022 Dec 07, 2022

There is no Math.Pl function. It's Math.PI

 

Try this:

n = 0;
if (numKeys > 0){
	n = nearestKey(time).index;
	if (key(n).time > time){
		n--
	}
}
if (n == 0){
	t = 0;
}
else{
	t = time - key(n).time;
}
n = nearestKey(time).index;
if (n > 0 && t < 1){
	v = velocityAtTime(key(n).time) - thisComp.frameDuration / 10;
	amp = .45;
	freq = 4.0;
	decay = 8.0;
	value + v * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t);
}	
else {
	value;
}

When you have problems with an expression, it is a

...

Votes

Translate

Translate
Community Expert ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

There is no Math.Pl function. It's Math.PI

 

Try this:

n = 0;
if (numKeys > 0){
	n = nearestKey(time).index;
	if (key(n).time > time){
		n--
	}
}
if (n == 0){
	t = 0;
}
else{
	t = time - key(n).time;
}
n = nearestKey(time).index;
if (n > 0 && t < 1){
	v = velocityAtTime(key(n).time) - thisComp.frameDuration / 10;
	amp = .45;
	freq = 4.0;
	decay = 8.0;
	value + v * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t);
}	
else {
	value;
}

When you have problems with an expression, it is a good idea to use the toolbar's </> tool to post the expression.  When you have problems with a tutorial, it is always helpful to post a link to the tutorial. Unfortunately, most of them are presented by enthusiasts, and the workflows and explanations can be a little sketchy. 

 

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
Contributor ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

LATEST

Thank you so much. I will remember what you said. Thank you.

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