Error compiling fragment shader on GLSL 1.30
<p>what is wrong with the following fragment shader? It compiles OK under GLSL 4.0 but fails on GLSL 1.30.</p>

<p>This is the code:</p>

<pre><code>// Fragment Shader
"uniform sampler2D texture;\n"
"uniform sampler1D cmap;\n"
"uniform float minZ;\n"
"uniform float maxZ;\n"
"\n"
"void main() {\n"
"    float height = texture2D(texture,gl_TexCoord[0].st);\n"
"    float lum = (height-minZ)/(maxZ-minZ);\n"
"    if (lum &gt; 1.0) lum = 1.0;\n"
"    else if (lum &lt; 0.0) lum = 0.0;\n"
"    gl_FragColor = texture1D(cmap, lum);\n"
"}"
</code></pre>

<p>These are the errors:</p>

<pre><code>FRAGMENT glCompileShader "" FAILED
FRAGMENT Shader "" infolog:
0:7(2): error: initializer of type vec4 cannot be assigned to variable of type float
0:8(2): error: initializer of type vec4 cannot be assigned to variable of type float
0:9(6): error: operands to relational operators must be scalar and numeric
0:9(6): error: if-statement condition must be scalar boolean
0:9(17): error: value of type float cannot be assigned to variable of type vec4
0:10(11): error: operands to relational operators must be scalar and numeric
</code></pre>