Can not apply TexSampler variable on custom shader expression

So I tried to create custom blur texture material expression. Did all accordingly to documentation. There is code:
float3 blur = Texture2DSample(Tex, TexSampler, UV);

for (int i = 0; i < r; i++)
{

blur += Texture2DSample(Tex, TexSampler, UV + float2(i * dist, 0));
blur += Texture2DSample(Tex, TexSampler, UV - float2(i * dist, 0));

}

for (int j = 0; j < r; j++)
{

blur += Texture2DSample(Tex, TexSampler, UV + float2(0, j * dist));
blur += Texture2DSample(Tex, TexSampler, UV - float2(0, j * dist));

}

blur /= 2(2r)+1;
return blur;

… and my blueprint setup
image

I’ve ended with up use of undeclared identifier ‘TexSampler’ error

Nextly, managed to search for solution there and found this topic. Solution isn’t working for me. Still got the same error
New code
float3 blur = Tex.Sample(TexSampler, UV);

for (int i = 0; i < r; i++)
{

blur += Tex.Sample(TexSampler, UV + float2(i * dist, 0));
blur += Tex.Sample(TexSampler, UV - float2(i * dist, 0));

}

for (int j = 0; j < r; j++)
{

blur += Tex.Sample(TexSampler, UV + float2(0, j * dist));
blur += Tex.Sample(TexSampler, UV - float2(0, j * dist));

}

blur /= 2*(2*r)+1;
return blur;

New error

How can I use TexSampler?

This is the method easiest… I hope can to help you.

Tex,UV,iter,distancia;
distancia/=1000;
float3 img = Texture2DSample (Tex,TexSampler,UV);

for(int i=0; i<iter; i++)
{
img+= Texture2DSample (Tex,TexSampler,UV+float2(idistancia,0));
img+= Texture2DSample (Tex,TexSampler,UV-float2(i
distancia,0));
img+= Texture2DSample (Tex,TexSampler,UV+float2(0,idistancia));
img+= Texture2DSample (Tex,TexSampler,UV-float2(0,i
distancia));
}
img/=(4*iter)+1;
return img;