hi guys , i have in folder FILE this txt, 2016.txt , i want , when people find 2015.txt return simply error, for do that i use this code
int YearCtrl = 5;
Print("I ANNI SONO QUESTI--- "+ (Year()-YearCtrl));
string Anni=(IntegerToString((Year()-YearCtrl))+".txt");
long search_handle=FileFindFirst("Dir1\\*.txt",Anni);
if(search_handle!=INVALID_HANDLE)
{
Print("NON CE QUELLO CHE CERCHI "+ IntegerToString((Year()-YearCtrl))+".txt");
}
else
{
Print("ECCO QUELLO CHE CERCHI "+IntegerToString((Year()-YearCtrl))+".txt");
}
but when try to find 2015.txt , if dont switch in case wrong
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
hi guys , i have in folder FILE this txt, 2016.txt , i want , when people find 2015.txt return simply error, for do that i use this code
but when try to find 2015.txt , if dont switch in case wrong
why ? o_O
anyone can help me ?