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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    50 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    69 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    36 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    97 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X