Results 1 to 4 of 4

Thread: wait until. how does it works?

  1. #1
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default wait until. how does it works?

    how does it works? becouse i got this error:
    SCAR Code:
    Line 256: [Error] (12953:6): Invalid number of parameters
    here is the line:
    SCAR Code:
    wait until (not(FindDTM(Food[i],a,b,MIX1,MIY1,MIX2,MIY2)))

    can someone teach me how does it works?


  2. #2
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you have to make a repeat until loop

    SCAR Code:
    repeat
      Wait(1000); //will wait one second.
    until(not(FindDTM(Food[i],a,b,MIX1,MIY1,MIX2,MIY2)));

    but when it doens't found the food it will wait forever. so you have to make fail saves in it like:

    SCAR Code:
    C := 0;
    repeat
      C := C + 1; //will add 1 to c
      Wait(1000); //waits one second;
    until (not(FindDTM(Food[i],a,b,MIX1,MIY1,MIX2,MIY2))) or (C >= 5); //now it will also stop repeating if c is or is higher then 5.
    if C >= 5 then LogOut;

    hope this helps

  3. #3
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rikjess View Post
    you have to make a repeat until loop

    SCAR Code:
    repeat
      Wait(1000); //will wait one second.
    until(not(FindDTM(Food[i],a,b,MIX1,MIY1,MIX2,MIY2)));

    but when it doens't found the food it will wait forever. so you have to make fail saves in it like:

    SCAR Code:
    C := 0;
    repeat
      C := C + 1; //will add 1 to c
      Wait(1000); //waits one second;
    until (not(FindDTM(Food[i],a,b,MIX1,MIY1,MIX2,MIY2))) or (C >= 5); //now it will also stop repeating if c is or is higher then 5.
    if C >= 5 then LogOut;

    hope this helps
    thx rikjess this helped a lot !


  4. #4
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Wait Until Something.....
    By FortAsh in forum OSR Help
    Replies: 5
    Last Post: 01-29-2009, 05:09 PM
  2. Is there a wait option in C++?
    By Rs-Gp-4U in forum C/C++ Help and Tutorials
    Replies: 13
    Last Post: 03-06-2008, 09:01 PM
  3. I can't wait =D
    By Eugeniu in forum News and General
    Replies: 18
    Last Post: 09-28-2007, 12:59 AM
  4. Wait Until?
    By drnewheart in forum OSR Help
    Replies: 2
    Last Post: 09-23-2007, 02:49 AM
  5. wait()?
    By omgh4x0rz in forum Java Help and Tutorials
    Replies: 3
    Last Post: 04-28-2007, 02:39 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
  •