Im reading a double from an excel is returning an int?

 

Hello there, Im having a bit of trouble here:


double Read_File(int i)
   {
      int handle=FileOpen(Archivo_Historical(),FILE_READ|FILE_CSV);
      while(Time[i]!=FileReadString(handle) && !FileIsEnding(handle))
         FileReadString(handle);
      int valor=StrToDouble(FileReadString(handle));
      FileClose(handle);
      return valor;

   }


Im reading values like 52.2,  90.3, etc....  but Im receiving them like 52.0 and 90.0 My excel uses "." and not "," as a decimal point. Maybe this is a clue of what could be happening.


Could you help me?


Thank you.

 
double Read_File(int i)
   {
      int handle=FileOpen(Archivo_Historical(),FILE_READ|FILE_CSV);
      while(Time[i]!=FileReadString(handle) && !FileIsEnding(handle))
         FileReadString(handle);
//      int valor=StrToDouble(FileReadString(handle));
      double valor=StrToDouble(FileReadString(handle));
      FileClose(handle);
      return valor;

  }
 

Oh my...

I think Im more retarded everyday.

Thank you soo much for pointing the error!

 
Don't worry, I think we've all done that at some point! Or something similar.
Reason: