Syntax error unexpected token 'else' [SOLVED]

Hi. I´m trying to validate this code:

if(abs(WorldPos.x - ParticlePos.x) > (BoxSize.x / 2)} || abs(WorldPos.y - ParticlePos.y) > (BoxSize.y / 2) || abs(WorldPos.z - ParticlePos.z) > (BoxSize.z / 2)}
{
return 0;
} else {
return 1;
}

It´s from a tutorial, but it´s nothing working. I´m putting it in a Custom material node. I´m not able to find the syntax error. Could someone help me?

Thanks in advance.

Actually, there are more error messages:

Ok, I found the errors. It worked. But, the code is different from the tutorial. The tutorial was made using Unreal 4, and I´m using 5. Are there differences in code between the two Unreal versions?

You swapped out some normal brackets for curly ones. I’m guessing this was the intended code

if(abs(WorldPos.x - ParticlePos.x) > (BoxSize.x / 2) || 
abs(WorldPos.y - ParticlePos.y) > (BoxSize.y / 2) || 
abs(WorldPos.z - ParticlePos.z) > (BoxSize.z / 2))
{
return 0;
} else {
return 1;
}

Yeah. I´ve already corrected the code. Thanks.