Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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,634
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

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

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