PEBakery supports automatic syntax checking.
Copy codes into Syntax Checker provided in Utilities.
Make sure your script is visible in project tree. Open script's interface, and click the question button near script title.
If Auto Syntax Check Error setting is enabled, the button's icon and color reports if error exists.