Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The use of CurrentBar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    The use of CurrentBar

    Hello,

    How do you stop a loop with CurrentBar in OBU?

    Code:
    if(CurrentBar < 391) return;
    What if i want the loop to start at 391 and stop at 789? How do you write that?

    Code:
    if(CurrentBar < 391 & CurrentBar > 789 ) return;
    TY

    #2
    Hello frankduc,

    To stop a loop you would use break statement. https://docs.microsoft.com/en-us/dot...keywords/break

    If you wanted to use the CurrentBar you could use it like you have, I don't know how you are overall trying to use the CurrentBar to advise on that. CurrentBar is an int so you can use it in conditions like you have shown to check if its less equal or greater than a value.

    If you wanted to start at 391 and end at 789 in the loop you would need to use those values in your loop. To learn more about how to use loops please use Microsofts C# documentation: https://docs.microsoft.com/en-us/dot...h-the-for-loop

    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    650 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    577 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X