Fragmentshader/Pixelshader, can't compare float values that have gotten from uniform

Hi!

I am trying to make a fragmentshader that check if the point is within a shape or not, but I am stuck on where I cant compare if a float is bigger then another one. I have not implemented the code for making the shape correct to the fragmentshader but that should not be the problem. My question is: why does it give me this error?

three.js:10149 Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at flatten (three.js:10149)
    at PureArrayUniform.setValueV4fArray [as setValue] (three.js:10464)
    at Function.WebGLUniforms.upload (three.js:10676)
    at setProgram (three.js:15781)
    at WebGLRenderer.renderBufferDirect (three.js:15250)
    at renderObject (three.js:15572)
    at renderObjects (three.js:15554)
    at renderScene (three.js:15514)
    at WebGLRenderer.render (three.js:15417)
    at animate (?editor_console=true:398)

https://jsfiddle.net/f32zgm7j/24/
Line 157, expect a lot of console spam, making the 1. or 0. into a int, 1 or 0 shows that it need to compare to a float, no error spam, doing as it wants and giving it a float gives this error, and I can’t understand where I am going wrong.

Any help appreciated!
Best regards
Philip

I have solved this, turns out that the code wanted me to specify the length of the array, but I didn’t know the length of the array, as that is always different (in the end) and based on a answer that I saw somewhere they said just put it to a max and loop though them all, but I guess that did not work.

I will probably have to use SSBO to get the length into the shader, if that will be necessary.