Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by clonman. 11/13/25 14:04
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Training with the R bridge does not work
by frutza. 11/05/25 00:46
Zorro 2.70
by opm. 10/24/25 03:44
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 21,112 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sheliepaley, Blueguy, blobplayintennis, someone2, NotEBspark
19177 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Redefined with different type: g #486439
08/20/22 13:09
08/20/22 13:09
Joined: Aug 2022
Posts: 15
Connecticut USA
W
WaltT Offline OP
Newbie
WaltT  Offline OP
Newbie
W

Joined: Aug 2022
Posts: 15
Connecticut USA
I'm new to Zorro, and I'm moving a script over from MQL4, and I've encountered this error: "Redefined with different type: g".

It refers to a line where I define an int:

int Slippage = 3;

I don't understand what the error is trying to tell me. It seems like it's saying that I've already defined Slippage earlier in the script, but I haven't. Would someone please clarify?

Re: Redefined with different type: g [Re: WaltT] #486440
08/20/22 14:51
08/20/22 14:51
Joined: Feb 2017
Posts: 1,809
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,809
Chicago
Slippage is an already taken global variable. Use a different name.
https://zorro-project.com/manual/en/spread.htm

Re: Redefined with different type: g [Re: AndrewAMD] #486441
08/20/22 15:46
08/20/22 15:46
Joined: Aug 2022
Posts: 15
Connecticut USA
W
WaltT Offline OP
Newbie
WaltT  Offline OP
Newbie
W

Joined: Aug 2022
Posts: 15
Connecticut USA
Ah, thanks! Is there a list of predefined global variables somewhere? I couldn't find such a list.

Re: Redefined with different type: g [Re: WaltT] #486444
08/20/22 18:04
08/20/22 18:04
Joined: Feb 2017
Posts: 1,809
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,809
Chicago
Yes, they are all listed under the variables.h header under the include directory. Also, the manual.

Re: Redefined with different type: g [Re: AndrewAMD] #486445
08/20/22 18:39
08/20/22 18:39
Joined: Aug 2022
Posts: 15
Connecticut USA
W
WaltT Offline OP
Newbie
WaltT  Offline OP
Newbie
W

Joined: Aug 2022
Posts: 15
Connecticut USA
Thank you! That list in variables.h is very helpful!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1