Log in

View Full Version : Really weird error when trying to use MouseBox.



KeepBotting
08-31-2012, 12:07 AM
** Warning in GaussBox: Point invalid (323, 552) **

The point changes every time I run my script.
The point isn't invalid. I've checked four times.

KeepBotting
08-31-2012, 12:33 AM
Help?

print
08-31-2012, 12:35 AM
try doing // at the line that usually works for me ha

Le Jingle
08-31-2012, 12:39 AM
Make sure (x1, y1) values are lower integers compared to (x2, y2);
http://i.imgur.com/P34Cc.png
Also, how are you using the aforementioned 'error' code? More would help (i.e. if it's being passed wrong parameters with a function/procedure from the include

KeepBotting
08-31-2012, 12:40 AM
try doing // at the line that usually works for me haBut I need the line.


Make sure (x1, y1) values are lower integers compared to (x2, y2);
http://i.imgur.com/P34Cc.pngThey are.

Runaway
08-31-2012, 01:12 AM
Could you post the line / relevant lines?

KeepBotting
08-31-2012, 01:29 AM
Could you post the line / relevant lines?Oh, sorry. Never mind. Fixed it lmao.

t4q
04-08-2013, 12:34 PM
Oh, sorry. Never mind. Fixed it lmao.
How did you fix it, Iam facing the same problem?

Ian
04-08-2013, 12:49 PM
How did you fix it, Iam facing the same problem?

Post the relevant code please :)

t4q
04-08-2013, 02:42 PM
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.23);
if findcolorsspiraltolerance(x, y, DoorTPA, 2184045, MSX1, MSY1, MSX2, MSY2, 5) then
begin
DoorATPA := SplitTPAEx(DoorTPA, 8, 8);
SortATPASize(DoorATPA, true);
for i := 0 to high(DoorATPA) do
begin
DoorBox := GetTPABounds(DoorATPA[i]);
SMART_DebugATPA(true, DoorATPA);
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
mousebox(DoorBox.x1 + 2, Doorbox.Y1 + 2, Doorbox.X2 - 2, Doorbox.Y2 - 2, mouse_move);
That's the code.. It started to work when i replaced last line with

mousebox(DoorBox.x1, Doorbox.Y1, Doorbox.X2, Doorbox.Y2, mouse_move);

Thing is I don't understand why I got that error beause door was big enough to use those +2's and -2's

Ian
04-08-2013, 02:48 PM
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.23);
if findcolorsspiraltolerance(x, y, DoorTPA, 2184045, MSX1, MSY1, MSX2, MSY2, 5) then
begin
DoorATPA := SplitTPAEx(DoorTPA, 8, 8);
SortATPASize(DoorATPA, true);
for i := 0 to high(DoorATPA) do
begin
DoorBox := GetTPABounds(DoorATPA[i]);
SMART_DebugATPA(true, DoorATPA);
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
mousebox(DoorBox.x1 + 2, Doorbox.Y1 + 2, Doorbox.X2 - 2, Doorbox.Y2 - 2, mouse_move);
That's the code.. It started to work when i replaced last line with

mousebox(DoorBox.x1, Doorbox.Y1, Doorbox.X2, Doorbox.Y2, mouse_move);

Thing is I don't understand why I got that error beause door was big enough to use those +2's and -2's

Try putting the math in the brackets like so:


MouseBox((DoorBox.x1 + 2), (Doorbox.Y1 + 2), (Doorbox.X2 - 2), (Doorbox.Y2 - 2), mouse_move);

t4q
04-08-2013, 02:53 PM
of corse lol, tnx