OrderSend() return value

 

In the documentation it says that OrderSend() returns -1 on failure. But in the expert advisor example documentation here, it shows the following:

Ticket=OrderSend(Symb,OP_BUY,Lts,Ask,2,SL,TP);//Opening Buy
if (Ticket < 0)                        // Success :)
{
    Alert ("Opened order Buy ",Ticket);
    return;                             // Exit start()
}
if (Fun_Error(GetLastError())==1)      // Processing errors
    continue;                           // Retrying
return;                                // Exit start()


if(Ticket < 0) //Success


Directly after that it checks for the error number anyway. So I'm confused with this logic...

 
The Book examples has some Errors ... Ignore that piece of code. Should be >
 
ubzen:
The Book examples has some Errors ... Ignore that piece of code. Should be >
. . . and make sure you Print() the error number if the OrderSend() failed . . . What are Function return values ? How do I use them ?
 
Thanks all!
Reason: