error order select value to be checked

 
I am getting an error on the below code(return value of order select should be checked). Anyone able to help with removing error. Have attached full EA code

int CountPendingOrders()
{
   int TodayslimitedOrders = 0;

   for(int i=0; i<OrdersTotal(); i++)
   {
      OrderSelect(OrderGetTicket(i));
      string OrderSymbol = OrderGetString(ORDER_SYMBOL);
      if(OrderSymbol == Symbol())
      {
         TodayslimitedOrders += 1;
      }
   }
   return(TodayslimitedOrders);
}//+------------------------------------------------------------------+ 
      
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Order Properties - Trade Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Bwalya Tambule: f order select should be checked). Anyone able to help 
  1. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. So check it.
                    
       for(int i=0; i<OrdersTotal(); i++) if(
          OrderSelect(OrderGetTicket(i))
       && OrderGetString(ORDER_SYMBOL) == _Symbol
       ){
    

Reason: