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

Expression shows error

Enthusiast ,
Dec 07, 2022 Dec 07, 2022

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
468
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 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

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

 

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

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

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