what can i do ?

 
thanks for being there always,  then what can i change
if (OrdersTotal() == 0){
 to so it can be placing more order . can i make it to be :
 int TimePattern()
{int cnt=0;
if (cnt<OrdersTotal()){
 
 thanks
 
drink ...

... just kidding, anyway, your code example is out of context, have no idea what are you trying to do ...
 

Depends on what you are trying to do.
Would have been easier to keep to your origional post in asking this question

if (OrdersTotal()<=2) //and varaiations of could be a solution.