Narcle
2008-10-26 04:37:30
Edit: Or not…
Okay… I've tried couple different ways and this is what I have atm:
I originally had Result := Ar1; but then Widget pointed out to me that it would make it a pointer so I couldn't do that. The code above I use the same as for CombineIntArray and works; I know Wizzup has one but I wanted to make sure they were in order so I made one.
Any help would be much appreciated.
Okay… I've tried couple different ways and this is what I have atm:
Function CombineStrArr(Ar1, Ar2: TStringArray): TStringArray;
var
L, H, i: integer;
begin
SetArrayLength(Result, Length(Ar1) + Length(Ar2));
L := Low(Ar1);
H := High(Ar1);
For i := L to H do
Result[i] := Ar1[i];//Line with error (174)
L := H + 1;
H := High(Result);
for i := L to H do
Result[i] := Ar2[i-L];
end;And I get this error:[Runtime Error] : Exception: Access violation at address 00405266 in module 'scar.exe'. Read of address FFFFFFF7 in line 174 in script
I originally had Result := Ar1; but then Widget pointed out to me that it would make it a pointer so I couldn't do that. The code above I use the same as for CombineIntArray and works; I know Wizzup has one but I wanted to make sure they were in order so I made one.
Any help would be much appreciated.