Toon shader error

Following an old tutorial on creating a toon shader but it seems to give some error that i do not understand.

Errors:
incompatible type for parameter #1 (“s”) at lines 116 and 118 , but there are no lines 116 and 118.

Any help is appreciated.

Shader "Custom/Toon1" {
	Properties {
		_Color ("Color", Color) = (1,1,1,1)
		_MainTex ("Base (RGB)", 2D) = "white" {}
		_Normal ("Normal Map", 2D) = "white" {}
		
		_SpecMap ("Specular Map", 2D) = "white" {}
		_Glossiness ("Gloss", range(1,8)) = 2
		
		_Shading ("Shading", range(0,1)) = 0.5
		_Lighting ("Lighting", range(0,1)) = 0.5
		
		_Outline ("Outline", range(0,1)) = 0.1
		_OutlineColor ("Outline Color", Color) = (0,0,0,1)
		
		_ShadingSoftness ("Shading Softness", range(0,1)) = 0
		_OutlineSoftness ("Outline Softness", range(0,1)) = 0
	}
	SubShader {
		Tags { "RenderType"="Opaque" }
		LOD 200
		
		CGPROGRAM
		#pragma surface surf Lambert
		#pragma target 3.0

		half4 _Color;
		sampler2D _MainTex;
		sampler2D _NormalMap;
		
		sampler2D _SpecMap;
		half _Glossiness;
		
		half _Shading;
		half _Lighting;
		
		half _Outline;
		half4 _OutlineColor;
		
		half _ShadingSoftness;
		half _OutlineSoftness;
		
		struct MySurfaceOutput
		{
			half3 Albedo;
			half3 Normal;
			half3 Emission;
			half Specular;
			half Alpha;
			
			half3 GlossColor;
		};
		
		half halfDiffuseTerm(half3 a, half3 b)
		{
			return dot(normalize(a), normalize(b)) * 0.5f + 0.5f;
		}
		
		half diffuseTerm(half3 a, half3 b)
		{
			return max(0, dot(normalize(a), dot(normalize(b))));
		}
		
		half softStep(half a, half b, half softness)
		{
			return step(a,b) * clamp((b-a)/softness,0,1);
		}
		
		half4 LightingSpecMap(MySurfaceOutput o, half3 lightDir, half3 viewDir, half atten)
		{
			//half d = diffuseTerm(o.Normal, lightDir);
			half d = halfDiffuseTerm(o.Normal, lightDir);
			
			half shade = softStep(_Shading, d, _ShadingSoftness);
			
			half3 diffuseColor = _LightColor0.rgb * o.Albedo.rgb * shade; // (1-d)
			
			half sp = pow(diffuseTerm(o.Normal, lightDir + viewDir), _Glossiness);
			
			half light = softStep(_Lighting, sp, _ShadingSoftness);
			
			half3 specularColor = _LightColor0.rgb * o.GlossColor.rgb * light;
			
			half3 returnColor = (diffuseColor + specularColor) * atten * 2;
			
			return half4(returnColor, o.Alpha);
		}
		
		struct Input {
			float2 uv_MainTex;
			float3 viewDir;
		};

		void surf (Input IN, inout MySurfaceOutput o) {
			half4 c = tex2D (_MainTex, IN.uv_MainTex);
			
			half3 n = UnpackNormal( tex2D(_NormalMap, IN.uv_MainTex));
			o.Normal = n;
			
			half d = dot(normalize(IN.viewDir), o.Normal);
			
			half line = softStep(_Outline, d, _OutlineSoftness);
			
			o.Albedo = (c.rgb * _Color.rgb * line) + ((1-line) * _OutlineColor.rgb);
			o.Alpha = c.a;
			
			half4 sp = tex2D(_SpecMap, IN.uv_MainTex);
			o.GlossColor = sp.rgb;
		}
		ENDCG
	} 
	FallBack "Diffuse"
}

Fixed. I forgot to set to the custom lighting function, my bad. But strangely, the var “line” in surf function gave an error as an unexpected token, so i changed to “l” and it went away.

Shader "Custom/Toon1" {
	Properties {
		_Color ("Color", Color) = (1,1,1,1)
		_MainTex ("Base (RGB)", 2D) = "white" {}
		_Normal ("Normal Map", 2D) = "white" {}
		
		_SpecMap ("Specular Map", 2D) = "white" {}
		_Glossiness ("Gloss", range(1,8)) = 2
		
		_Shading ("Shading", range(0,1)) = 0.5
		_Lighting ("Lighting", range(0,1)) = 0.5
		
		_Outline ("Outline", range(0,1)) = 0.1
		_OutlineColor ("Outline Color", Color) = (0,0,0,1)
		
		_ShadingSoftness ("Shading Softness", range(0,1)) = 0
		_OutlineSoftness ("Outline Softness", range(0,1)) = 0
	}
	SubShader {
		Tags { "RenderType"="Opaque" }
		LOD 200
		
		CGPROGRAM
		#pragma surface surf SpecMap
		#pragma target 3.0

		half4 _Color;
		sampler2D _MainTex;
		sampler2D _NormalMap;
		
		sampler2D _SpecMap;
		half _Glossiness;
		
		half _Shading;
		half _Lighting;
		
		half _Outline;
		half4 _OutlineColor;
		
		half _ShadingSoftness;
		half _OutlineSoftness;
		
		struct MySurfaceOutput
		{
			half3 Albedo;
			half3 Normal;
			half3 Emission;
			half Specular;
			half3 GlossColor;
			half Alpha;
			
		};
		
		struct Input {
			float2 uv_MainTex;
			float3 viewDir;
		};
		
		half halfDiffuseTerm(half3 a, half3 b)
		{
			return dot(normalize(a), normalize(b)) * 0.5f + 0.5f;
		}
		
		half diffuseTerm(half3 a, half3 b)
		{
			return max(0, dot(normalize(a), normalize(b)));
		}
		
		half softStep(half a, half b, half softness)
		{
			return step(a,b) * clamp((b-a)/softness,0,1);
		}
		
		inline half4 LightingSpecMap(MySurfaceOutput o, half3 lightDir, half3 viewDir, half atten)
		{
			//half d = diffuseTerm(o.Normal, lightDir);
			half d = halfDiffuseTerm(o.Normal, lightDir);
			
			half shade = softStep(_Shading, d, _ShadingSoftness);
			
			half3 diffuseColor = _LightColor0.rgb * o.Albedo.rgb * shade;
			
			half sp = pow(diffuseTerm(o.Normal, lightDir + viewDir), _Glossiness);
			
			half light = softStep(_Lighting, sp, _ShadingSoftness);
			
			half3 specularColor = _LightColor0.rgb * o.GlossColor.rgb * light;
			
			half3 returnColor = (diffuseColor + specularColor) * atten * 2;
			
			return half4(returnColor, o.Alpha);
		}
		
		

		void surf (Input IN, inout MySurfaceOutput o) {
			half4 c = tex2D (_MainTex, IN.uv_MainTex);
			
			half3 n = UnpackNormal( tex2D(_NormalMap, IN.uv_MainTex));
			o.Normal = n;
			
			half d = dot(normalize(IN.viewDir), o.Normal);
			
			half l = softStep(_Outline, d, _OutlineSoftness);
			
			o.Albedo = (c.rgb * _Color.rgb * l) + ((1-l) * _OutlineColor.rgb);

			o.Alpha = c.a;
			
			half4 sp = tex2D(_SpecMap, IN.uv_MainTex);
			o.GlossColor = sp.rgb;
		}
		ENDCG
	} 
	FallBack "Diffuse"
}