Alright, here is the little script, and I wanna know why the heck it gives me this error:
[Runtime Error] : Type Mismatch in line 16 in script C:\Program Files\SCAR 3.15\Scripts\Reflections record path.scar
SCAR Code:
program DebugNPCs;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/reflection/reflection.scar}
var
i:integer;
NPCs:array of TNPC;
s:string;
p:TPoint;
begin
SetupSRL;
repeat
wait(800);//line 16
if IsFKeyDown(2) then
begin
try
ClearDebug;
NPCs := SortNPCs(GetNPCs);
//NPCs := SortNPCs(GetNPCsByID(3795));
p := GetMyPos;
writeln('Tile ('+inttostr(p.x)+', '+inttostr(p.y)+')');
writeln('MS ('+inttostr(TileToMS(p,20).x)+', '+inttostr(TileToMS(p,20).y)+')');
Writeln('NPCs on screen: '+inttostr(GetArrayLength(NPCs)));
for i := 0 to High(NPCs) do
begin
s := padr(NPCs[i].Name,20);
s := s + ' ID: '+padr(inttostr(NPCs[i].NPCType),7);
s := s + ' ('+inttostr(NPCs[i].Tile.X)+', '+inttostr(NPCs[i].Tile.Y)+')';
s := s + ' In Fight: '+BoolToStr(NPCs[i].InFight);
s := s + ' Is Moving: '+BoolToStr(NPCs[i].IsMoving);
Writeln(s);
end;
sleep(1500);
except
writeln('oh noes!')
sleep(1500);
end;
end;
until False;
end.
thanks a lot,
-Pure1993