Declaration of Array Error message from compile MT4build 600 - page 2 123 New comment Alain Verleyen 2014.02.16 08:16 #11 DanielTahiti: Hi, Hi personnaly used that, before resizing with the numbers of pairs selected by the trader : double atd_AtrMarge[][][][]; and i get the same compiler message : '[' - invalid index value ??? Only the first dimension can be dynamic [] murger 2014.02.17 02:36 #12 angevoyageur: Only the first dimension can be dynamic [] Of course, Thanks, we all this change, beeing paranoic before thouhgt.. Thanks. D Hossein Eslamizadeh 2017.04.30 11:00 #13 hi, i try to define an array like this int l=4;double wInput[l];but i got the same error " [" invalid index valuebut when i write thisdouble wInput[4];there is no error!i think we are not allowed to use variables for index in decluration stage, if that is the problem, can anybody give me any solution? thanks. Invalid trade volume Sorting Initializing an array with honest_knave 2017.04.30 11:09 #14 You can only use numbers or predefined constants #define l (4) double wInput[l]; Hossein Eslamizadeh 2017.04.30 11:15 #15 honest_knave: it does not work. thanks any way. honest_knave 2017.04.30 11:15 #16 hossein71: it does not work. thanks any way.Yes, it does. What is your error message? Hossein Eslamizadeh 2017.04.30 11:24 #17 honest_knave: Yes, it does. What is your error message?i wrote this#define l (4) double wInput[l];and i got these errors ";" unexpected token'[' unbalanced left paranthesis']'semicolon expected'wInput' undeclared identifierwInput parameter conversion not allowed honest_knave 2017.04.30 11:28 #18 hossein71: i wrote thisand i got these errors ";" unexpected token'[' unbalanced left paranthesis']'semicolon expected'wInput' undeclared identifierwInput parameter conversion not allowedThere must be more lines in your code causing the problem. This compiles without error:#property strict void OnStart() { #define l (4) double wInput[l]; } Hossein Eslamizadeh 2017.04.30 11:35 #19 honest_knave: There must be more lines in your code. This compiles without error:i wrote it in my own function ( Subroutine) and call it from OnInit()i wrote it directly in OnInitand these errors disappear";" unexpected token'[' unbalanced left paranthesis']'semicolon expectedbut still i got 'wInput' undeclared identifier'wInput' parameter conversion not allowedi don't know why these errors appear! i wrote by several languages like java, c , basic ,matlab but none of them were like this ! My Automatic Robot Error Errors, bugs, questions Unexpected end of program honest_knave 2017.04.30 11:37 #20 Unfortunately, unless you post up your code I can't help you. As you can see from my example above (and the examples in the documentation) it works. Good luck! 123 New comment
Hi,
Hi personnaly used that, before resizing with the numbers of pairs selected by the trader :
double atd_AtrMarge[][][][];
and i get the same compiler message :
'[' - invalid index value
???
Only the first dimension can be dynamic []
Only the first dimension can be dynamic []
Of course, Thanks, we all this change, beeing paranoic before thouhgt.. Thanks.
D
hi, i try to define an array like this
int l=4;
double wInput[l];
but i got the same error " [" invalid index value
but when i write this
double wInput[4];
there is no error!
i think we are not allowed to use variables for index in decluration stage, if that is the problem, can anybody give me any solution? thanks.
You can only use numbers or predefined constants
it does not work. thanks any way.
Yes, it does. What is your error message?
Yes, it does. What is your error message?
i wrote this
and i got these errors
";" unexpected token
'[' unbalanced left paranthesis
']'semicolon expected
'wInput' undeclared identifier
wInput parameter conversion not allowed
i wrote this
and i got these errors
";" unexpected token
'[' unbalanced left paranthesis
']'semicolon expected
'wInput' undeclared identifier
wInput parameter conversion not allowed
There must be more lines in your code causing the problem. This compiles without error:
There must be more lines in your code. This compiles without error:
i wrote it in my own function ( Subroutine) and call it from OnInit()
i wrote it directly in OnInitand these errors disappear
";" unexpected token
'[' unbalanced left paranthesis
']'semicolon expected
but still i got
'wInput' undeclared identifier
'wInput' parameter conversion not allowed
i don't know why these errors appear! i wrote by several languages like java, c , basic ,matlab but none of them were like this !
Unfortunately, unless you post up your code I can't help you.
As you can see from my example above (and the examples in the documentation) it works.
Good luck!