-
Expression error in new CC2019 java script
I have this expression
it’s fully worked on the legacy expression but it give error on the new java script engine in CC2019 so how i can make it run on CC2019 please without changing to legacy format.
var x = thisComp.layer("Controller-Values-Colors").effect("Colums-Row-1-9")("Slider");
var p = transform.xPosition;
if(x==6) {p = 1920};
if(x==5) {p =1102};
if(x==4) {p = 760};
if(x==3) {p = 418};
if(x==2) {p = 77};
if(x==1) {p = -265};