GLSL shader won't compile

Hi,

I have this shader that doesn’t really do anything yet. for some reason, however, I get “syntax error” where I define the varying vec4 “uv”

Shader "Blocker/FloorScreen"
{
	Properties
	{
	floorTex ("Floor", 2D) = "white" {} 
	}
	SubShader
	{
	Pass
	{

        GLSLPROGRAM

		uniform sampler2D floorTex;	
		varying vec4 uv;

		#ifdef VERTEX

		void main()
		{
			uv = gl_MultiTexCoord0;
			gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
		}

		#endif


		#ifdef FRAGMENT

		void main()
		{
			gl_FragColor = texture2D(floorTex, vec2(uv));
		}

		#endif

		ENDGLSL
      }
   }
}

I simply can’t see what’s wrong with this oO

Ok, I changed it to…

    GLSLPROGRAM

	uniform sampler2D floorTex;	

	#ifdef VERTEX
	varying vec4 uv;

	void main()
	{
		uv = gl_MultiTexCoord0;
		gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
	}

	#endif

	#ifdef FRAGMENT
	varying vec4 uv;

	void main()
	{
		gl_FragColor = texture2D(floorTex, vec2(uv));
		//gl_FragColor = vec4(1.0,1.0,0.8,0.5);

	}

I moved the definition of uv into the vertex and pixel shader separately. This works now. Strange, though. Shouldn’t the other way work, too?