SRL Archive - Help and Support

access violations


rikioh

2006-09-10 16:38:30

i keep getting random access violations in scar/includes/srl/srl/core/text.srl lines 420 - 429 it seems to be different line everytime dunno tho

Dankness

2006-09-10 17:19:53

you need to set your players array's nickname, It makes a Bitmap of your nickname and if you do a search for a blank bitmapmask then you get a runtime error.

rikioh

2006-09-10 17:50:02

ah ty dankness

dlsa

2006-10-19 19:41:18

Hey guys i too get this error but i believe it's for a different reason maybe not but I've set the nickname and when i try to run a script i get that error.

Mr. Freeweed

2006-10-20 02:02:50

I never get that problem when I forget to set the nick. My mouse just goes funky and finds so off the wall xy to the left middle. Could it be scripted or another function in srl. was procedure or methods was it using at the time it encountered the error. I can see the error line number but not the code used where it was happening.


this is what is at 420 - 439 are you using chooseoption?

function ClickOption(s: String; i: Integer): Boolean;
var
x, y, tmpMask: Integer;
begin
tmpMask := CreateBitmapMaskFromText(s, UpChars);
case i of
1:
begin
if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 0, 520, 340, 10, 50)) then
begin
Wait(25 + Random(50));
Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
Result := True;
end;
end;
2:
begin
if (FindBitmapMaskTolerance(tmpMask, x, y, 550, 200, 750, 470, 10, 50)) then
begin
Wait(25 + Random(50));
Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
Result := True;
end;
end;
3:
begin
if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 340, 500, 460, 10, 50)) then
begin
Wait(25 + Random(50));
Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
Result := True;
end;
end;
end;
FreeBitmap(tmpMask);
end;

dlsa

2006-10-22 16:43:24

Yea i'm pretty sure it's not the code itself. Although i still haven't figured out my problem.