Unresolved Import function call

To add comments, please log in or register
holocast
108
holocast  

I am trying to use the import function on mt4 and I keep getting the error unresolved import function call, what could be the problem

#import "tlib.ex4"

double Min(double a,double b,double c,double d,double e);

#import
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {int b = 56;
  int c =34;
  int e = 17;
  int a = 65;
  int d = 13;
//---
//Alert (" I started ");
   double t = Min(a,b,c,d,e);
   Alert(t);
  }

Above is the code I use in the script to call the function.

This is the library

//+------------------------------------------------------------------+
//| My function                                                      |
//+------------------------------------------------------------------+
// int MyCalculator(int value,int value2) export
//   {
//    return(value+value2);
//   }
//+------------------------------------------------------------------+
double Min(double a,double b,double c,double d,double e)
  {
   double minimum=a;
   if(b<minimum)
      minimum=b;
   if(c<minimum)
      minimum=c;
   if(d<minimum)
      minimum=d;
   if(e<minimum)
      minimum=e;
   return (minimum);
  }

Am I missing anything?

Alain Verleyen
36058
Alain Verleyen  
double Min(double a,double b,double c,double d,double e) export
holocast
108
holocast  
Alain Verleyen:
Thanks a lot. It works... Can't believe I missed that
To add comments, please log in or register