Delphi 11.3 problem with var string parameter

Scripter variables are Variants and never initialized. Thus, you need to initialize them yourself:

 IDEScripter1.SourceCode.Text:='var S:string;'#13#10+
                               'begin'#13#10+
                               ' S := '''''#13#10+
                               ' TC.TestCall(10,S);'#13#10+
                               'end;';

So make sure S is a string by initializing it to an empty string, and your script should work.