Log in

View Full Version : Weird error with the newest SRL!



Secet
06-17-2007, 06:09 PM
I'm using my own woodcutting script (SecetCutter, check woodcutting section), but after new SRL it doesn't work fully:
It compiles and stuff, but after minute or two it just gives Runtime error:
[Runtime Error] : Exception: Access violation at address 006A8E70 in module 'scar.exe'. Read of address 00000034 in line 316 in script C:\Program Files\SCAR 3.06\includes\srl\srl\core\Text.scar

On that line in Text.scar:


{************************************************* ******************************
procedure CloseWindow;
By: Stupid3ooo
Description: Closes frontmost window.
************************************************** *****************************}

procedure CloseWindow;
begin
if (FindBitmapMaskTolerance(CWindow, x, y, 400, 3, 515, 100, 0, 85)) then
Mouse(x + 8, y + 3, 3, 1, True);
end;


if (FindBitmapMaskTolerance(CWindow, x, y, 400, 3, 515, 100, 0, 85)) then is the exact line.

Anyone else having the same problem, or is it just me?

Pentti
06-17-2007, 06:47 PM
They probably didn't load CWindow bitmap in SRL.
Not sure.

WT-Fakawi
06-17-2007, 07:34 PM
x and y are globals. If they are used by another function that makes x or y negative, you will get this error. These are all historical bugs, dated back from the time we didnt mind so much about globals. The workaround is pretty simple, make x and y local for this function, and rename them to w.e. CWx, and CWy...

Secet
06-17-2007, 09:35 PM
x and y are globals. If they are used by another function that makes x or y negative, you will get this error. These are all historical bugs, dated back from the time we didnt mind so much about globals. The workaround is pretty simple, make x and y local for this function, and rename them to w.e. CWx, and CWy...

That function is not in my script, it is in SRL

WT-Fakawi
06-17-2007, 10:22 PM
Remove CloseWindow from FindNormalRandoms. Maybe it will help. You sure you dont use x and y in your script?

ronny.m.p
06-17-2007, 11:40 PM
Just find where you used x,y and change it to like MYX MYY (example) and voila it's solved...pretty much what fakawi said :)

munk
07-02-2007, 12:57 PM
did anyone ever figure this out. I keep gettin the same error and its been pissin me off all night, and ive tried everything everyones said and much more. any more ideas?

[edit]
Ahhhhhh! i got it! stupidest thing ever. just make sure you have "setUpSRL;" somewhere in your declaring area. god damit, wasted so much time on that. mod can close this now.