ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression Error: Expression result must be of dimension 2, not 1 ...

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Paul Connors
Expression Error: Expression result must be of dimension 2, not 1 ...
on Oct 9, 2019 at 1:55:19 pm

Hi Guys. I'm getting an error on a position expression control that says: "Expression result must be of dimension 2, not 1 ... "

I have a slider that goes from 1-5. I'm trying to move the position controller based on the number in that slider.


numSlider = effect("Number of Slider")("Slider");
x = 960;
if (numSlider == 5) {(x,418)} else {(x,540)}


Currently I have the slider set to 5 so I could test my expression. It didn't work. Ha. I really can't see any reason why this shouldn't work though. It's giving me the error at Line 1 as if it thinks I want the variable "numSlider" to be the output.

Any help would be greatly appreciated. Thanks.


Return to posts index

Dan Ebberts
Re: Expression Error: Expression result must be of dimension 2, not 1 ...
on Oct 9, 2019 at 4:05:45 pm

You need square brackets instead of parens:

numSlider = effect("Number of Slider")("Slider");
x = 960;
if (numSlider == 5) {[x,418]} else {[x,540]}


Dan



Return to posts index

Paul Connors
Re: Expression Error: Expression result must be of dimension 2, not 1 ...
on Oct 9, 2019 at 7:42:18 pm

As always ... thanks very much Dan!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]