Gamestudio Links
Zorro Links
Newest Posts
freewhyblogelsewhere
by 9489cpjf. 06/03/24 06:06
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,018 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 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,731
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

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

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