It's not a syntax error because it's valid syntax.
if(x == 5) is the comparison x with 5. if(x = 5) is a comparison with x set to 5, thus true. if(x = 0) is a comparison with x, but set to 0, thus not true.
Click and join the 3dgs irc community! Room: #3dgs