Results 1 to 7 of 7

Thread: Question on using the Break; command!

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

    Default Question on using the Break; command!

    Ok, say I have something like this in my main loop:

    SCAR Code:
    Begin
    Chop;
    Repeat
    Wait(500)
    Until(Condition)
    End.

    How would I break out of that loop - without the condition being met? Like this?


    SCAR Code:
    Begin
    Chop;
    Repeat
    Wait(500)
    If(Condition)Then
    Break;
    Until(Condition)
    End.

  2. #2
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if (condition) then
    do (conditons action);

    Is that what you mean?

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    Begin
      Chop;
        Repeat
          IfNot (Condition)Then //with the condition being met 'if', without it 'if not';
            Break
          else      
           Wait(500)
        Until(Condition)
    End.

  4. #4
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Yes, Sand Storm, yours works fine.

  5. #5
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @Naum or w/e - thanks, I'll try that.

    @Bull - I thought so, but it doesn't seem to want to :/.

  6. #6
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    while not(condition)
    do wait(50);


  7. #7
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Example:

    SCAR Code:
    Repeat
    Mine
    Drop
    Count
    If Loads > LoadsSet Then break;
    Mine
    Drop
    Count(ores)
    Until(Loads > LoadsSet)
    ~Hermen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. help with command
    By lemonfuzz in forum OSR Help
    Replies: 2
    Last Post: 05-24-2008, 12:02 PM
  2. break?
    By faster789 in forum OSR Help
    Replies: 2
    Last Post: 03-31-2008, 03:11 AM
  3. Is there a command for...
    By Jacobdm0 in forum OSR Help
    Replies: 3
    Last Post: 11-17-2007, 04:33 PM
  4. The 'With' Command...
    By Pancakes in forum OSR Help
    Replies: 1
    Last Post: 08-20-2007, 12:43 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
  •