I'm trying to make a slider that basically can act as a crossfader between a bunch of different layers (so as the slider goes up, it fades through several layers). This is what I've written, and I'm getting the error "Error: SyntaxError: Unexpected Token )" on the first line and I'm having trouble telling where the problem is. My code:
if(thisComp.layer("Null 1").effect("Slider Control")("Slider") <= 5)
{
if(thisComp.layer("Null 1").effect("Slider Control")("Slider") <= 2.5)
{
out = linear("Null 1").effect("Slider Control")("Slider"), 0, 100, 0, 2.5);
}
else
{
out = linear("Null 1").effect("Slider Control")("Slider"), 0, 100, 2.5, 5);
out = 100 - out;
}
}
}
else{
out = 0;
}
out;
Thank you!!