SRL Archive - OSR Help

depressing access violation


Awkwardsaw

2010-10-03 16:32:26

function findvoidknight : boolean;
var
tp : TPoint;
annpc : TNPCArray;
i, x, y : integer;
begin
annpc := GetNPCs;
annpc := SortNPCs(annpc);
if length(annpc) < 1 then
begin
writeln('could not find void knight');
exit;
end;
writeln(length(annpc)); //results 13
for i := 0 to high(annpc) do //never gets past i = 0
begin
if not (annpc[i].Name = 'Void Knight') then //access violation
continue;

me nor #srl figured it out, so what am i doing wrong? :o

Shuttleu

2010-10-03 16:36:45

find out the value of i when it gets the violation
that way we can see if it is doing it correctly at least one

~shut

Awkwardsaw

2010-10-03 16:38:54

From: Shuttleu
find out the value of i when it gets the violation
that way we can see if it is doing it correctly at least one

~shut


it's 0

Shuttleu

2010-10-03 16:40:08

can you find out what annpc[0].Name equals

~shut

Awkwardsaw

2010-10-03 16:46:20

From: Shuttleu
can you find out what annpc[0].Name equals

~shut


it suddenly started working, with no changes to it save for some writelns :o

although i would still like to know how an access violation acured, so i might be able to fix it

Shuttleu

2010-10-03 16:48:42

From: Awkwardsaw
it suddenly started working, with no changes to it save for some writelns :o

although i would still like to know how an access violation acured, so i might be able to fix it


no idea, but at least its working

hope to see the pest controller soon ;)

~shut

Wizzup?

2010-10-03 16:57:12

From: Awkwardsaw
it suddenly started working, with no changes to it save for some writelns :o

although i would still like to know how an access violation acured, so i might be able to fix it


I fear that perhaps wrong hooks or other wrong input to SMART can cause this.

Awkwardsaw

2010-10-03 19:08:31

From: Wizzup?
I fear that perhaps wrong hooks or other wrong input to SMART can cause this.


alright, thanks :)

pyroryan

2010-10-03 22:06:12

From: Wizzup?
I fear that perhaps wrong hooks or other wrong input to SMART can cause this.


Hooks seem alright. But if the updater is wrong then that would be a problem on my end :(