SRL Archive - OSR Help

Compilation error for TpointArrayArray and setLength


slushpuppy

2013-05-26 09:59:31

{$DEFINE SMART}
{$DEFINE SMART8}
{$I SRL/SRL.Simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
WorldInfo := [27, 42, 45, 46, 48, 52, 59, 70, 72, 78, 79, 87, 104, 115, 117];
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Slayer;
Active := True;
end;
end;
var
atpa : T2DPointArray;
begin
{$IFDEF SMART}
{$IFDEF SIMBAMAJOR980}
Smart_Server := 72;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ELSE}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
{$ENDIF}

DeclarePlayers;
SetupSRL;
atpa := SetLength(atpa,1);
end.

[Error] (39:28): Type mismatch at line 38
Compiling failed.

?????????????

rj

2013-05-26 10:01:20

I think you can only setlength for 1d arrays, pretty sure, not as computer ATM so I can't test

nielsie95

2013-05-26 10:07:35

SetLength is a procedure, not a function. It alters the length of its parameter.

rj

2013-05-26 10:09:01

Ooo ^^ he's right why didn't I catch that, all you need is setlength(atpa,1)

slushpuppy

2013-05-26 10:16:36

Oh thanks alot guys..


been coding for nearly 3 hours straight:duh: