Results 1 to 4 of 4

Thread: Reattempt after failures

  1. #1
    Join Date
    Jun 2014
    Location
    EastCoast
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default Reattempt after failures

    http://hastebin.com/nobaninohe.vhdl Do i need to add a repeat in order for this to reattempt until true? Do i need to add a repeat in order for this to reattempt until true? When i did add a repeat it wouldn't close the function to continue the main loop right.
    Simba Code:
    function MillTalk: boolean;
    begin
    //repeat
      Wait(1000+random(1000));
      FindColorSpiralTolerance( x, y, 7510987, MSX1, MSY1, MSX2, MSY2, 2);
      Wait(500+random(250));
      MMouse(x, y, 2, 2);
      Wait(500);
      If IsUpText('wmil') then
      begin
        WriteLn('Found MillOperator');
        Mouse(x, y, 2, 2, false)
        WaitOption('pla',500);
        Wait(500);
        If FindColorSpiralTolerance(x, y, 5602200, MSX1, MSY1, MSX2, MSY2, 2) then
          begin
            Mouse(x, y, 2, 2, false);
            WaitOption('All',500);
            WriteLn('Converting Logs');

          end else
            Exit;

      end else
        Exit;

      Result:= True;
    //until true
    end;

  2. #2
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Simba Code:
    MarkTime(MillTalkTimer);
    repeat
      Sleep(250);
    until(MillTalk or TimeFromMark(MillTalkTimer) > 30000);

    Will repeat MillTalk timer until it returns true, or when it has tried for 30 seconds.
    There used to be something meaningful here.

  3. #3
    Join Date
    Jun 2014
    Location
    EastCoast
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    So all i was missing was
    until result :=true?

  4. #4
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Well no, you have that code what I gave as an example, where you would call your MillTalk function.
    There used to be something meaningful here.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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