How to show to the final user the message of the Compiler

I have this structure

if not FScript.Compile then begin
   Result := Pair.Result;
   raise Exception.Create(Pair.Result.FieldName +': '+FScript.CompilerErrorToStr(0));
else begin

but FScript.CompilerMessage[0] always raises an Access Violation Error;

I can’t relate to all of you what I was doing bad. Now works. I’m sorry.