SRL Archive - OSR Help

Out of Bounds Error


Ian

2012-10-02 14:56:25

Hey, my script is running fine but occasionally it starts to constantly spam this error:

Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.

It quickly fills the entire debug box and that's quite annoying.

Would be great if anyone who know what the problem is could tell me how to fix it.

Thanks, BMWxi

Nebula

2012-10-02 15:01:56

Happens when a finder function (ie FindColorsTolerance) tries searching outside the client bounds. Try to determine which finder function is causing the issue.

Ian

2012-10-02 15:04:26

If FindObjCustom(x, y, ['take', 'Raw', 'Chicken'], [12567240], 3) Then 

This I think

E: Is there any way to get FindObjCustom to search only on the main screen?

I think'll have to use FindObjEx to only search the main screen.

riwu

2012-10-03 05:35:15

From: BMWxi
If FindObjCustom(x, y, ['take', 'Raw', 'Chicken'], [12567240], 3) Then 

This I think

E: Is there any way to get FindObjCustom to search only on the main screen?

I think'll have to use FindObjEx to only search the main screen.

It already does.
function FindObjCustom(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol: Integer): Boolean;
begin
Result := FindObjEx(cx, cy, Text, Color, Tol, 50, MSX1, MSY1, MSX2, MSY2);
end;
Post all your finder functions if the problem persists.

NKN

2012-10-03 07:05:02

It's FindObject

It did it for me when I used it.