Qbasicnews.com

Full Version: Who here is VERY good at troubleshooting QB programs?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Well.... it's there...
ummm, I get an error saying "subscript of out range".
Quote:ummm, I get an error saying "subscript of out range".
Antoni said that the code might need some debugging, so get in there and find out why you get that error.
*****
I know why, but I don't truly know what it would affect if I changed it. One of the arrays is being given more numbers than it can hold. Well...that's what I think anyway.
Which array is given more numbers?
*****
Well, for one, line 65 and another is line 92. I don't know how to go about fixing it. However I think that's what the error means.
What immediately sticks out to me is that you declare all of your arrays as integers, but then try to call them as singles:

Quote:DIM ENTRY1%(1 TO 10)
...
Quote:IF ENTRY1(X) = 1 THEN ONES = ONES + 1

solution: remove all of the % from the declaration and add DEFINT A-Z on the top of the program


^^Ok this is bugging me, how the hell do I get these quote and bold markers to work?
I wanted only integers allowed, but whatever.....ok. To be honest, this was the first time using % as well. I'm used to the simple "INT".

Anonymous

Quote:What immediately sticks out to me is that you declare all of your arrays as integers, but then try to call them as singles:

Quote:DIM ENTRY1%(1 TO 10)
...
Quote:IF ENTRY1(X) = 1 THEN ONES = ONES + 1

solution: remove all of the % from the declaration and add DEFINT A-Z on the top of the program


^^Ok this is bugging me, how the hell do I get these quote and bold markers to work?

maybe uncheck "Disable BBCode in this post" ... it should be right
below the text area you type into to make a post.
Well then that it probably the problem, you have to use % everywhere that you call the array, or else it thinks you are calling something else and will give you an out of range error.
Pages: 1 2 3 4 5 6