SRL Archive - OSR Help

Array length


xdarkshadowx

2013-03-17 17:52:08

Figured it out.

Le Jingle

2013-03-17 17:55:51

From: xdarkshadowx
setArrayLength(arr, count); isn't working for me, getting Error: Could not call proc at line 26

Please advise.


Is there any more context to this error you receive?
Here's an example of using SetArrayLength:

var
TPA: TPointArray;
begin
Writeln('Length of TPA is: ' + IntToStr(Length(TPA)) + '.');
SetArrayLength(TPA, 10);
Writeln('Length of TPA is: ' + IntToStr(Length(TPA)) + '.');
SetArrayLength(TPA, 0);
Writeln('Length of TPA is: ' + IntToStr(Length(TPA)) + '.');
end.

xdarkshadowx

2013-03-17 17:57:53

I had accidentally defined the array to a set length. Which was making it imposible to change the length.

Le Jingle

2013-03-17 18:16:34

From: xdarkshadowx
I had accidentally defined the array to a set length. Which was making it imposible to change the length.


Ah, alright, glad you solved it.
If you need any help, don't be shy to shoot me a pm :)
Cheers,
Lj