Shuttleu
12-16-2010, 10:58 PM
anyone know why i get a access violation
the error is at compile time
program ReflectionScript;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
{$i srl/srl/misc/paintsmart.scar}
const
{---SMART Setup Constants---}
WORLD = 32;
MEMBERS = false;
SIGNED = true;
{---------------------------}
var
NPCs: TNPCArray;
Dots: array of TPointArray;
Colors: TIntegerArray;
i: Integer;
sdf:tstringarray;
begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
SetupSRL;
SetupReflectionEx(true);
SetArrayLength(Dots, 3);
Colors:= [255, 16776960, 65280];
repeat
NPCs:= GetNPCs;
for i:=0 to High(NPCs) do
if InStrArr('Attack', NPCs[i].Actions, True) then
if (NPCs[i].Level < GetMe.Level) then
begin
SetArrayLength(Dots[0], Length(Dots[0])+1);
Dots[0][High(Dots[0])]:= TileToMM(NPCs[i].Tile);
end else
if (NPCs[i].Level = GetMe.Level) then
begin
SetArrayLength(Dots[1], Length(Dots[1])+1);
Dots[1][High(Dots[1])]:= TileToMM(NPCs[i].Tile);
end else
if (NPCs[i].Level > GetMe.Level) then
begin
SetArrayLength(Dots[2], Length(Dots[2])+1);
Dots[2][High(Dots[2])]:= TileToMM(NPCs[i].Tile);
end;
SMART_DrawDotsEx(True, Dots[0], Colors[0]);
SMART_DrawDotsEx(False, Dots[1], Colors[1]);
SMART_DrawDotsEx(False, Dots[2], Colors[2]);
until(false);
end.
~shut
the error is at compile time
program ReflectionScript;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
{$i srl/srl/misc/paintsmart.scar}
const
{---SMART Setup Constants---}
WORLD = 32;
MEMBERS = false;
SIGNED = true;
{---------------------------}
var
NPCs: TNPCArray;
Dots: array of TPointArray;
Colors: TIntegerArray;
i: Integer;
sdf:tstringarray;
begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
SetupSRL;
SetupReflectionEx(true);
SetArrayLength(Dots, 3);
Colors:= [255, 16776960, 65280];
repeat
NPCs:= GetNPCs;
for i:=0 to High(NPCs) do
if InStrArr('Attack', NPCs[i].Actions, True) then
if (NPCs[i].Level < GetMe.Level) then
begin
SetArrayLength(Dots[0], Length(Dots[0])+1);
Dots[0][High(Dots[0])]:= TileToMM(NPCs[i].Tile);
end else
if (NPCs[i].Level = GetMe.Level) then
begin
SetArrayLength(Dots[1], Length(Dots[1])+1);
Dots[1][High(Dots[1])]:= TileToMM(NPCs[i].Tile);
end else
if (NPCs[i].Level > GetMe.Level) then
begin
SetArrayLength(Dots[2], Length(Dots[2])+1);
Dots[2][High(Dots[2])]:= TileToMM(NPCs[i].Tile);
end;
SMART_DrawDotsEx(True, Dots[0], Colors[0]);
SMART_DrawDotsEx(False, Dots[1], Colors[1]);
SMART_DrawDotsEx(False, Dots[2], Colors[2]);
until(false);
end.
~shut