possible loss of data due to type conversion AND implicit conversion from 'number' to 'string'

 
Hi

In the code bellow I see some warning. How can I fix these warnings? Please help me. Thank you

 ///////////////////////////////////////////////////////
int init()
  {
   p = Hours*60 / Period();
   if(fs == 0)
     {
      sName = CurTime();//possible loss of data due to type conversion
      fs = 1;
     }
   return(0);
  }
///////////////////////////////////////////////////////
int deinit()
  {
   ObjectDelete("1" + sName);//implicit conversion from 'number' to 'string'
   ObjectDelete("0" + sName);
   ObjectDelete("2" + sName);
   return (0);
  }
///////////////////////////////////////////////////////
      p1 = iBarShift(Symbol(), Period(), ObjectGet("1" + sName, OBJPROP_TIME1));//implicit conversion from 'number' to 'string'
/////////////////////////////////////////////////////// 
 

When you post code please use the CODE button (Alt-S)!

Use the CODE button

 

Lord of the Trades: . How can I fix these warnings?

  1. You fix these warning by learning how to code.

  2.       sName = CurTime();//possible loss of data due to type conversion
    

    CurTime has been an obsolete function for over a decade. Use TimeCurrent().

  3. Do you really expect an answer? There are no mind readers here and our crystal balls are cracked, so we can't see your machine.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    Always post all relevant code (using Code button) or attach the source file.

    You are assigning a datetime (a long) to (likely) an int. Code fails in 2038 when it overflows MAX_INT. Use a long.

  4.       p1 = iBarShift(Symbol(), Period(), ObjectGet("1" + sName, OBJPROP_TIME1));//implicit conversion from 'number' to 'string'
    
    You are adding a string to a number, implicitly. Be explicit: string(sName).