SRL Archive - OSR Help

Some Array help?


Troll

2011-12-05 14:23:55

So my secound question today :( Ive got a TPA but i need to pass it into a function which takes an Array of TPA's. So i tried changing a TPA into it doing it like this
[smart]
OreTPA,RubishTPA :TPointArray;
ATPA1,ATPA2,ATPA3,OreATPA :TPointArrayArray;
[/smart]

[smart]
SetLength(OreATPA,1);
OreATPA[0] := [OreTPA] //line 133
[/smart]

I think this is causing this run time error

Error: Type Mismatch at line 133

but if this is not the error say so and ill post the whole function/script :)


Thanks for the help :D

RISK

2011-12-05 14:28:18

Why not just:
OreATPA := SplitTPAEx(OreTPA, 15, 15);

Or:
oreATPA := TPAToATPAEx(oreTPA, 15, 15);

The first example merges all found TPAs in a 15x15 box and puts them in to your ATPA.
The second example does not merge the found TPAs and puts them in to your ATPA.

Troll

2011-12-05 14:29:45

Ok ill try that in a min then, thanks :)