Results 1 to 3 of 3

Thread: Nooby Loop Problem :(

  1. #1
    Join Date
    May 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Nooby Loop Problem :(

    I have written a script to detect if a bank is nearby, if so it is clicked on. Here is the code I am using to detect and click on the banking symbol. If the bank can not be found the script is run again and again until it finds the symbol (and see's the red flag), at which point it exits the loop. However the problem is: THE LOOP NEVER EXITS!! ahhh! I thought a simple boolean would fix the matter but it has not. I fear this an extremely nooby post but please, if anyone's out there, please help!

    SCAR Code:
    SymbolAccuracy := 0.01;
      repeat
        if (FindSymbol(x, y, 'bank')) then
          begin
            Mouse(x+random(13), y, 0, 0, True);
            if (FlagPresent) then
              begin
                Foundthebank:=true;
                Writeln('Found The Bank!');
              end;
          end else
            writeln('Could Not Find the Bank');
            Foundthebank:=false;
      until(Foundthebank);

  2. #2
    Join Date
    Feb 2008
    Location
    In the woods of Finland
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    SymbolAccuracy := 0.01;
      repeat
        if (FindSymbol(x, y, 'bank')) then
          begin
            Mouse(x+random(13), y, 0, 0, True);
            if (FlagPresent) then
              begin
                Foundthebank:=true;
                Writeln('Found The Bank!');
              end;
          end else
          begin // You need a begin here
            writeln('Could Not Find the Bank');
            Foundthebank:=false;
          end; // and end here, otherwise it always makes 'Foundthebank' false
      until(Foundthebank);
    Cut & Drop or Stock Powerchonker


    Teh 3vil Oar H1t5 Chuck Norris Stone c0ld

  3. #3
    Join Date
    May 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You must be a god

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. loop problem
    By drizzt in forum OSR Help
    Replies: 5
    Last Post: 02-16-2008, 12:30 AM
  2. Nooby java applet problem
    By JAD in forum Java Help and Tutorials
    Replies: 4
    Last Post: 02-13-2008, 08:15 AM
  3. Nooby Problem
    By joeyfeduka in forum OSR Help
    Replies: 3
    Last Post: 02-11-2008, 11:52 PM
  4. Main Loop Problem
    By kryptonite in forum OSR Help
    Replies: 9
    Last Post: 07-25-2007, 02:22 PM
  5. Infite loop problem
    By twobac in forum OSR Help
    Replies: 6
    Last Post: 02-03-2007, 06:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •