Results 1 to 3 of 3

Thread: function waituntil

  1. #1
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default function waituntil

    SCAR Code:
    function waituntil(what: boolean;milliseconds: integer): boolean;
    var i: integer;
    begin
      i:=0;
      repeat
        i:=i+1;
        begin
          wait(1);
        end;
      until(what = true) or (i=milliseconds);
      result:=true;
    end;


    ok this will wait until something happens for example
    SCAR Code:
    begin
    waituntil(findcolor(x,y,23423,1,1,700,700),1000)

    the second part of it is how many milliseconds to wait in total before giving up

  2. #2
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    This won't qualify because you never declared what repeated is.


  3. #3
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    whoops sorry made last minute changes editing right now

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 02-27-2008, 05:20 PM
  2. Replies: 2
    Last Post: 02-26-2008, 08:26 PM
  3. Any function that does this?
    By shadowpwner in forum OSR Help
    Replies: 2
    Last Post: 08-14-2007, 03:15 AM
  4. [FUNCTION] FindDoorColour: integer; By ZephyrsFury [FUNCTION]
    By ZephyrsFury in forum Research & Development Lounge
    Replies: 10
    Last Post: 07-27-2007, 08:45 AM

Posting Permissions

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