Thread: Loop problem

Results 1 to 6 of 6
  1. #1
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed

    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.

  2. #2
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    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.

  3. The Following User Says Thank You to Void For This Useful Post:

    258456 (09-11-2010)

  4. #3
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love
    you need to declare i and b

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  5. The Following User Says Thank You to Kallisti For This Useful Post:

    258456 (09-11-2010)

  6. #4
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Someone is missing the basics...?
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  7. The Following 2 Users Say Thank You to 'Bruno For This Useful Post:

    258456 (09-11-2010),Hell_Demon (09-12-2010)

  8. #5
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by Kallisti View Post
    you need to declare i and b
    That too. |:

  9. The Following User Says Thank You to Void For This Useful Post:

    258456 (09-11-2010)

  10. #6
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    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.

Similar Threads

  1. Loop Problem
    By AirCuddles in forum Combat Arms Help
    Replies: 7
    Last Post: 11-06-2009, 11:18 PM
  2. To All GunZ Down 02-07-06 PROBLEM
    By WertyRO in forum Gunz General
    Replies: 18
    Last Post: 02-09-2006, 07:41 PM
  3. hacking problems
    By iwillkillyou in forum WarRock - International Hacks
    Replies: 11
    Last Post: 02-04-2006, 04:37 PM
  4. WPE problem...
    By styx23 in forum General Game Hacking
    Replies: 8
    Last Post: 01-18-2006, 07:51 PM
  5. Problem Wit Hacking Programs
    By f5awp in forum General Gaming
    Replies: 5
    Last Post: 01-10-2006, 05:44 AM