Good afternoon! I'm writing a function, but the compiler is getting an error. I definitely haven't written this function before, I haven't written anything in time yet. I almost don't understand what the compiler is swearing at all.
int DayOfWeek()
{
MqlDateTime tm;
TimeCurrent(tm);
return(tm.day_of_week);
}
'DayOfWeek' - function already defined and has body Redo.mq5 2698 6
And if this function is already present in MQL5, why isn't it immediately highlighted in blue? Or how else should I understand it? And where is it in the help?
Dimka-novitsek: Afternoon! I'm writing a function and the compiler is swearing. I definitely haven't written this function before, I haven't written anything by time yet. I almost don't understand what the compiler is swearing at all.'DayOfWeek' - function already defined and has body Redo.mq5 2698 6
I don't get a swear word, although I usually apply the second type of time in the structure.
Dimka-novitsek: The most amazing thing is that it doesn't say there's an error, but that the function is already defined and the body is there!!! noooo,noooo!!!!!
Cut off the fractional part from the trillion... Yes.. It's important!!! )))))
If not int, at least long, eh?;)
I understand your indignation. But no one is preventing you from feeding a number like DBL_MAX or something close to it to the input. What will we get as a result? A 1024-bit integer?
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.
Can you be specific about this sending point?
Afternoon! I'm writing a function and the compiler is swearing. I definitely haven't written this function before, I haven't written anything by time yet. I almost don't understand what the compiler is swearing at all.'DayOfWeek' - function already defined and has body Redo.mq5 2698 6
I don't get a swear word, although I usually apply the second type of time in the structure.
Script:
The most amazing thing is that it doesn't say there's an error, but that the function is already defined and the body is there!!! Noooo, noooo!!!!!
Thanks for the example.
The most amazing thing is that it doesn't say there's an error, but that the function is already defined and the body is there!!! noooo,noooo!!!!!
>about round
Cut off the fractional part from the trillion... Yes.. It's important!!! )))))
If not int, at least long, eh?;)
I mean, the compiler swears there is one. Or did I misunderstand it, the compiler?
Not in the sense that I didn't write it before. Yeah. Thought I was dumb. But what could it be?