I keep getting this error, this is my code for an auto clicker,could you tell me whats wrong ? and the solution?
#include <iostream>
#include <windows.h>
#include <stdlib.h>
using namespace std;
int main()
{
SetConsoleTitle("AutoClicky");
{
cout << "autoclicky" << endl;
cout << " " << endl;
cout << " " << endl;
cout << " " << endl;
int x,y,slpTime,i;
cout << "Enter the number of times to click: " << endl;
cin >> i;1
cout << "Enter X Coordinate: " << endl;
cin >> x;5
cout << "Enter y Coordinate: " << endl;
cin >> y;5
cout << "Enter time in between clicks: " << endl;
cin >> slpTime;
cout << "Status." << "\n X coordinate: " << x << " \nY coordinate: " << y << " \nTime in seconds between clicks: " << slpTime << endl;
for(int t = 1; t <= i; t++){
SetCursorPos(x,y);
mouse_event(MOUSEEVENTF_RIGHTDOWN, x, y, 0, 0);
mouse_event(MOUSEEVENTF_RIGHTUP, x, y, 0, 0);
Sleep(slpTime*1000);
if (GetAsyncKeyState(VK_ESCAPE)){
exit(0);
}
else continue;
}
return 0;
}
}