title: GLSL Weird Error When Compiling Shader (structs)
body: <p>I have a fragment shader, it has structs and a uniform of those structs. When I tried to compile them, OpenGL gave me this error:</p>
  
  <pre><code>0(30) : error C0000: syntax error, unexpected identifier, expecting '{' at token "lights_a"
  0(31) : error C0000: syntax error, unexpected identifier, expecting '{' at token "material"
  </code></pre>
  
  <p>I don't know what the problem is here. I have been searching for the problem... I looked at line 30 and 31, I did everything I could imagine, but without success.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>#version 330 core
  struct LightBase
  {
      int renderit;
  
      vec4 ambient_light;
      vec4 specular_light;
      vec4 diffuse_light;
  
      float radius;
  
      vec3 light_position;
      vec3 light_direction;
  
      int light_type;
  };
  
  struct MaterialBase
  {
      vec4 ambient_affect;
      vec4 specular_affect;
      vec4 diffuse_affect;
      float shining;
  
      float mirror;
  
      int light_affect;
  };
  
  in vec3 VertexPos;
  in vec3 Normal;
  uniform int light_quantity;
  uniform LightBase lights_a[50];
  uniform MaterialBase material;
  uniform float usingTex;
  uniform sampler2D texturemap;
  in vec2 UVs;
  in vec4 Colors;
  out vec4 color;
  
  void main() {
  
      vec4 texture_u = texture(texturemap,UVs).rgba * usingTex;
      vec4 color_u = Colors * (1.0f-usingTex);
  
      vec4 final_color = color_u+texture_u;
      // Light
      for(int i=0;i&lt;light_quantity;i++) {
          if(lights_a[i].renderit==1) {
              if(lights_a[i].light_type==1) {
  
                  float attenuation = max(0.0,1.0-dot(lights_a[i].light_direction,lights_a[i].light_direction));
  
                  vec3 L = normalize(lights_a[i].light_direction);
                  vec3 N = normalize(Normal);
                  vec3 V = normalize(-VertexPos);
                  vec3 R = normalize(-reflect(L,N));
  
                  float nDotL = max(0.0,dot(N,L));
                  float rDotV = max(0.0,dot(R,V));
  
                  float ambient_result = lights_a[i].ambient_light * material.ambient_affect * attenuation;
                  float diffuse_result = lights_a[i].diffuse_light * material.diffuse_affect * nDotL * attenuation;
                  float specular_result = lights_a[i].specular_light * material.specular_affect * pow(rDotV,material.shining) * attenuation;
  
                  vec4 this_colour = (ambient_result + diffuse_result + specular_result) * final_color;
                      final_color = this_colour;
              }
      }
      }
  
  
      color = final_color;
  }
  </code></pre>
  
  <p>What's wrong about the code?</p>