Count and Pass

Miscellaneous
It issuies visual alerts to the screen
0 Views
0 Downloads
0 Favorites
Count and Pass
input int count = 50; // Set the counting limit as an input

int Counter; // counter variable

// Expert Initializing --------------------
int OnInit()
{
 return(INIT_SUCCEEDED);
}

// Expert DeInitializing -------------------
void OnDeinit(const int reason)
{

}

// Expert OnTick --------------------------
void OnTick()
{
 Counter ++; // add 1 to the counter on each tick.  
 Comment("Current Count -:", Counter);
 
 if(Counter == count)  // Count "X" times and pass   | This block Executed only once per each count.
 {
  
  // Your code goes here......

 Alert(count," Times counted"); 
 Counter = 0; // Reset the counter at the end of your code block. This is must. 
 } 

} // OnTick End  <<----------------------

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---