Dub
08-12-2012, 08:59 AM
Alright so I'm writing this PS autofighter, pretty much completely writing it myself because 99% of the SRL functions do not work on those anymore. Everything goes well until I suddenly get an error in a function that didn't create any errors before... without changing anything to the actual function...
Exception: Range check error at line 54
The function that returns this range check error is:
Function LowHealthz : Boolean;
begin
if FindColor(hpx,hpy,2070783,724,24,751,41)
then Result:=True
else Result:=False;
end;
P.S. I made the hpx and hpy LongInt variables just to be sure that they can contain the coords returned (yes, I was that desperate)
This function basically checks for the orange color of medium health in the small hp box next to your HP orb in the top right corner. Now, I read that it might be due to the fact that the coords I filled in at the FindColor are out of my client range, but I used the colorpicker to check and they're not. I tried rewriting but it keeps returning the same error to me.
Also, when this error occurs (= every time now..) it instantly closes the client window I have selected (which is a custom private server .jar that works fine with other scripts I wrote so far).
Any ideas or suggestions as to how to fix this? Would be much appreciated :)
Exception: Range check error at line 54
The function that returns this range check error is:
Function LowHealthz : Boolean;
begin
if FindColor(hpx,hpy,2070783,724,24,751,41)
then Result:=True
else Result:=False;
end;
P.S. I made the hpx and hpy LongInt variables just to be sure that they can contain the coords returned (yes, I was that desperate)
This function basically checks for the orange color of medium health in the small hp box next to your HP orb in the top right corner. Now, I read that it might be due to the fact that the coords I filled in at the FindColor are out of my client range, but I used the colorpicker to check and they're not. I tried rewriting but it keeps returning the same error to me.
Also, when this error occurs (= every time now..) it instantly closes the client window I have selected (which is a custom private server .jar that works fine with other scripts I wrote so far).
Any ideas or suggestions as to how to fix this? Would be much appreciated :)