Why would you call OnTick(); from within OnTimer()?.. OnTick is called by the NewTick event, which is dealt with by the terminal. So every time a tick is received by the terminal, OnTick() will be called and all code within it processed. You can define your functions outside of OnTick() and just call them within OnTick(). For example:
Inserted Code
//--define your function outside of OnTick() int MyFunction(int a, int b){ int result = a + b; return(result ); } void OnTick(){ int firstNumber = 5; int secondNumber = 10; //--call the function within OnTick() int MyAnswer = MyFunction( firstNumber, secondNumber); Print(MyAnswer); }