TfsScriptのCompileメソッドで、スクリプトの文法に間違いがないかを調べることができます。
文法に間違いがあるとき、CompileメソッドはFalseを返します。
if not fsScript1.Compile then
begin
// 文法に間違いがあるとき
end;
間違いの内容はErrorMsgプロパティで、間違っている場所はErrorPosプロパティで取得できます。
StatusBar1.SimpleText := Format('%s:%s', [fsScript1.ErrorPos, fsScript1.ErrorMsg]);