Array out of range / ArrayResize problem (yes again im sorry) - page 2 12 New comment Carl Schreiber 2015.12.12 10:18 #11 The problem is your program logic to resize the array there is something wrong.Go through your code using the debugger and look always at the size of your arrays when where and how do you change it! Errors, bugs, questions "ARRAY OUT OF BOUND" The < operator does ffoorr 2015.12.12 11:53 #12 try to print the size of the array Jason Crossfield 2015.12.12 12:14 #13 Solved thanks gooly and ffoorr for your input. My problem was using the ArrayResize variable when setting the Array values without a de-increment -1 to align with Array index sequence. So I was using this:ArrayResize(Closed,++closecnt); Closed[closecnt][0] = "one"; When the correct method is: ArrayResize(Closed,++closecnt); Closed[closecnt-1][0] = "one"; Arrays? MQL4 Indicator Array Problem int array not working ffoorr 2015.12.12 12:29 #14 yep that's right William Roeder 2015.12.12 12:32 #15 This is wrong. You want to increase the size to one and set element zero closecnt=closecnt++; ArrayResize(Closed,closecnt); : Closed[closecnt][0]="one";Like this.// closecnt=closecnt++; ArrayResize(Closed,closecnt+1); : Closed[closecnt][0]="one"; ++closecnt; // Now you have one. Jason Crossfield 2015.12.12 13:59 #16 Got it thanks WHRoeder :-) 12 New comment
The problem is your program logic to resize the array there is something wrong.
Go through your code using the debugger and look always at the size of your arrays when where and how do you change it!
try to print the size of the array
Solved thanks gooly and ffoorr for your input.
My problem was using the ArrayResize variable when setting the Array values without a de-increment -1 to align with Array index sequence.
So I was using this:
When the correct method is: