Computer Science Canada Array Subscript Error |
Author: | Dragon20942 [ Fri Nov 25, 2011 11:19 pm ] | ||
Post subject: | Array Subscript Error | ||
What is it you are trying to achieve? I am attempting to create a text file interactive save/load system for any future projects What is the problem you are having? Using the following file information: 2.4,6.3,4.2,8.4,0.0,0.0,0.0,0.0,0.0,0.0, I am able to gain the desired results. However, once any post "." value becomes more than 1 digit, I get the following error message: "Array subscript is out of range." on line 26. Describe what you have tried to solve this problem Line 26 deals with the pre "." integer, therefore the value of that integer should not affect line 26, but line 31. I have thought about this for hours, and changed the code slightly. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using 4.1.1 |
Author: | Tony [ Fri Nov 25, 2011 11:28 pm ] |
Post subject: | Re: Array Subscript Error |
Dragon20942 @ Fri Nov 25, 2011 11:19 pm wrote: I get the following error message: "Array subscript is out of range." on line 26.
Right before the faulty array access, print out the index that is attempted to be used. The actual value of the index might give you a clue as to why it's not what you expect it to be. |
Author: | Dragon20942 [ Fri Nov 25, 2011 11:42 pm ] | ||
Post subject: | Re: Array Subscript Error | ||
Thanks Tony! |