Ice bugs

Why sometimes ide says the error in my right written programs and often it doesn’t show any error if we add Semicolon in if after brackets sketch won’t work fine so idea should show error on that as well while compiling

Needs more punctuation.
And specific examples.

I do also get intermittent compile errors.
I just hit the compile button again and it compiles.
There are times I actually need to shut the IDE down and restart it for my sketch to compile - usually when it shows Java related errors.
I have learnt to live with it.

If you don't see the error, you may need to turn on verbose mode.
Sometimes you also need to scroll up or down to see the actual error data.