Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 17,843 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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,806
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,806
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,806
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,806
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