Guys, don't forget that... Sometimes a code with lower amount of lines is definitely not better than a code with higher amount of lines.
I am pointing out to speed now, it matters much more. Every single ms matters!
Here is a great little example:
SCAR Code:
var
i, tmr, x, h: Integer;
TSA: TStringArray;
begin
SetArrayLength(TSA, 10000000);
tmr:= GetSystemTime;
for i:= 0 to High(TSA) do
Inc(x);
WriteLn('Method A: X increased from 0 to ' + IntToStr(x) + ' (took ' + IntToStr(GetSystemTime - tmr) + 'ms.)');
x:= 0;
tmr:= GetSystemTime;
h:= High(TSA);
for i:= 0 to h do
Inc(x);
WriteLn('Method B: X increased from 0 to ' + IntToStr(x) + ' (took ' + IntToStr(GetSystemTime - tmr) + 'ms.)');
SetArrayLength(TSA, 0);
end.
Now, the "IsChatBoxTextLines" function (that ZephyrsFury fixed), would be faster with higher amount of lines...
Old:
SCAR Code:
function IsChatBoxTextLines(Text: string; Line1, Line2, TextCol: Integer): Boolean;
var
i: Integer;
begin
for i:= Max(Line1, Line2) downto Min(Line1, Line2) do
begin
Result:= FindChatBoxText(Text, i, TextCol);
if(Result)then
Exit;
end;
end;
New:
SCAR Code:
function IsChatBoxTextLines(Text: string; Line1, Line2, TextCol: Integer): Boolean;
var
i, tmpMx, tmpMn: Integer;
begin
tmpMn:= Min(Line1, Line2);
tmpMx:= Max(Line1, Line2);
for i:= tmpMx downto tmpMn do
begin
Result:= FindChatBoxText(Text, i, TextCol);
if(Result)then
Exit;
end;
end;
I myself got this lesson from Ron, and I am so glad I did.
It probably doesn't matter so much with small projects, but when you'll get around bigger projects in SCAR, you'll definitely want to get around maximum speeds. 
-Jani