Nufineek
02-09-2014, 01:04 AM
I keep getting this error:
Exception in Script: Runtime error: "Access violation" at line 352, column 53 in file "C:\Simba\Includes\SRL-6\lib\interfaces\chooseoption.simba"
Before this occurs, my script runs fine for 1 hour or so.
Here are the parts where the error occurs.
procedure openGEbanker;
var
x, y, i, c: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if (not bankScreen.isOpen()) then
begin
repeat
if (bankScreen.isOpen()) then
exit;
productionScreen.clickStart;
findColorsSpiralTolerance(x, y, TPA, 818592, mainScreen.getBounds(), 13, colorSetting(2, 0.12, 0.83));
ATPA := TPA.toATPA(30, 30);
atpa.sortFromFirstPoint(point(289, 40));
smartImage.debugATPA(ATPA);
if length(TPA) < 1 then
continue;
mouse(middleTPA(ATPA[0]), MOUSE_MOVE);
inc(c);
writeln(intToStr(c));
if isMouseOverText(['anker'], 500) then
begin
fastClick(MOUSE_RIGHT);
wait(100 + random(100));
chooseOption.select(['ank']);
end;
until (c = 30);
if c = 30 then
begin
Writeln('Failed to find the banker. Shutting down.');
TerminateScript;
end;
end;
end;
procedure withdrawItems;
begin
if not isLoggedIn() then
exit
if (not bankScreen.isOpen()) then
begin
Writeln('We are not at bank');
openGEbank;
end else
if random(75) > 73 then
begin
writeln('Pretending to looking at another website');
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(5000, 25000));
end;
bankScreen.withdraw(9, 14, ['']);
bankScreen.withdraw(10, 14, ['']);
end;
Exception in Script: Runtime error: "Access violation" at line 352, column 53 in file "C:\Simba\Includes\SRL-6\lib\interfaces\chooseoption.simba"
Before this occurs, my script runs fine for 1 hour or so.
Here are the parts where the error occurs.
procedure openGEbanker;
var
x, y, i, c: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if (not bankScreen.isOpen()) then
begin
repeat
if (bankScreen.isOpen()) then
exit;
productionScreen.clickStart;
findColorsSpiralTolerance(x, y, TPA, 818592, mainScreen.getBounds(), 13, colorSetting(2, 0.12, 0.83));
ATPA := TPA.toATPA(30, 30);
atpa.sortFromFirstPoint(point(289, 40));
smartImage.debugATPA(ATPA);
if length(TPA) < 1 then
continue;
mouse(middleTPA(ATPA[0]), MOUSE_MOVE);
inc(c);
writeln(intToStr(c));
if isMouseOverText(['anker'], 500) then
begin
fastClick(MOUSE_RIGHT);
wait(100 + random(100));
chooseOption.select(['ank']);
end;
until (c = 30);
if c = 30 then
begin
Writeln('Failed to find the banker. Shutting down.');
TerminateScript;
end;
end;
end;
procedure withdrawItems;
begin
if not isLoggedIn() then
exit
if (not bankScreen.isOpen()) then
begin
Writeln('We are not at bank');
openGEbank;
end else
if random(75) > 73 then
begin
writeln('Pretending to looking at another website');
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(5000, 25000));
end;
bankScreen.withdraw(9, 14, ['']);
bankScreen.withdraw(10, 14, ['']);
end;