Why does compilers says "variable already defined" - page 2

 

How can I fix this Error 


'Ticket'- variable already defined 


int ticket= OrderSend(Symbol(), OP_SELL, gTradeSize, Bid, 3, Ask + gStopLoss * Point, Ask - gTakeProfit * Point, 

                              NULL, 0, 0, Red);

 
kscottads #:

How can I fix this Error 


'Ticket'- variable already defined 


int ticket= OrderSend(Symbol(), OP_SELL, gTradeSize, Bid, 3, Ask + gStopLoss * Point, Ask - gTakeProfit * Point, 

                              NULL, 0, 0, Red);

You have already defined Ticket in your code meaning you have already stated what the value of Ticket is equeal to. (so check were in your code you have typed the same ting Ticket =.... Twice 
 
Christopher Hubert Gainsford #:
You have already defined Ticket in your code meaning you have already stated what the value of Ticket is equeal to. (so check were in your code you have typed the same ting Ticket =.... Twice 

No, you are describing assigning a value to an already defined variable.

He should look for a previous

int ticket;

or  int ticket=?;

The error report should actually state where the variable was previously defined.

Reason: