Loop problem

Posts 1–6 of 6 · Page 1 of 1
Loop problem
ok so, here is my code:

Code:
void leftclicker()
{
	
		
	for(i = 0; i=10; i++)
	{
		SetCursorPos(first_x, first_y);
		mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0,0,0,0);
		Sleep(500);
	if(GetAsyncKeyState(VK_SHIFT) &1){
		MessageBox(NULL, TEXT("BOT Stopped"), TEXT("Bot Status"), MB_OK);
        messages();	
	}

	}
for (b=0;b=1;b++)
	{
		SetCursorPos(second_x, second_y);
		mouse_event(MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP, 0,0,0,0);
		Sleep(1000);
		SetCursorPos(third_x, third_y);
		mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0,0,0,0);
		Sleep(2000);
		if(GetAsyncKeyState(VK_SHIFT)){
			messages();
		}
		rightclickunloader();
}

	
}
void rightclickunloader()
{
	leftclicker();
}
the problem is that it won't go to the right clicking, it just keeps left clicking, it stays with in the first FOR loop. Do you know anyway to solve this? Thanks in advance.
The second operand in your code uses an assignment operator. That means, it keeps setting i to 10. It's not checking anything.

Solution:
[php]
for(int i=0;i != 10;i++)
[/php]

While i does not equal 10; increment.

Do the same for your second for loop.
you need to declare i and b
Quote Originally Posted by Kallisti View Post
you need to declare i and b
That too. |:
Someone is missing the basics...?
lol, this is only a few lines out of my program. My program is over 300 lines of code. I just didn't want to post it all cuz u guys would get pissed, so i narrowed it down to that. Thanks guys.
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us