| Dantes3000 |
Отправлено: 18 Августа, 2018 - 02:30:20
|


Эксперт

Покинул форум
Сообщений всего: 1502
Дата рег-ции: Июнь 2016
Откуда: tg @true_zzz1
Репутация: 58

|
Нажмите для увеличения

В чем проблема? Всё отлично работает, указатель верный. А как только до этой фу-ии доходит - ошибка. Картинка правильная, ищет ее нормально.
CODE:int dr[76][1];loadimage (#dr[0][0], "D:\1Kib\EVE\dr.bmp");
function drone_check_hp()
{
int x,y;
int x1,y1;
int x2[999999];
int y2[999999];
//drone_low_hp
int d=findimage(-1, #dr[0][0], 0, #x2[0], #y2[0], 0, 0, xe, ye,20,20,20,20,20,20,100,1, w);
if(d>0)
{
if(findimage(1, #drone_papka[0][0], 0, #x1, #y1, 0, 0, xe, ye,20,20,20,20,20,20,100,1, w)==1)
{
for(int w=0; w<d; w++)
{
if(y2[w]<y1) continue;
enablerealmouse(10, 7, 0, 0);
mousemove(x,y,w); sleep(300); mouse(RIGHT);sleep(500);
if(findimage(1, #drone_return_to[0][0], 0, #x, #y, 0, 0, xe, ye,20,20,20,20,20,20,100,1, w)==1)
{
mousemove(x,y-7,w); sleep(300); mouse(LEFT); pause(2500);
}
enablerealmouse(20, 7, 1, 1); return;
}
}
}
}
|
| |
|
| Kibor |
Отправлено: 18 Августа, 2018 - 03:10:13
|


Эксперт

Покинул форум
Сообщений всего: 8359
Дата рег-ции: Март 2013
Откуда: Одесса
Репутация: 359

|
а это что?
Цитата: function drone_check_hp()
{
int x,y;
int x1,y1;
int x2[999999];
int y2[999999];
//drone_low_hp
int d=findimage(-1, #dr[0][0], 0, #x2[0], #y2[0], 0, 0, xe, ye,20,20,20,20,20,20,100,1, w);
if(d>0)
{
if(findimage(1, #drone_papka[0][0], 0, #x1, #y1, 0, 0, xe, ye,20,20,20,20,20,20,100,1, w)==1)
{
for(int w=0; w<d; w++)
{
if(y2[w]<y1) continue;
enablerealmouse(10, 7, 0, 0);
mousemove(x,y,w); sleep(300); mouse(RIGHT);sleep(500);
if(findimage(1, #drone_return_to[0][0], 0, #x, #y, 0, 0, xe, ye,20,20,20,20,20,20,100,1, w)==1)
{
mousemove(x,y-7,w); sleep(300); mouse(LEFT); pause(2500);
}
enablerealmouse(20, 7, 1, 1); return;
}
}
}
}
глобальная да, есть win w, а локальная то int w
я же дал уже подсказку. внимательны будьте |
| |
|
|