Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / I keep getting this weird error

Author
Message
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 10th Sep 2005 19:38
My game works fine until I press tab (scancode 15) to call this code into action...

I get
Quote: "Runtime error 118 - array does not exist or array subscript out of bounds at line 365"

this is the array code

any ideas why I'm getting this message?

FROGGIE!
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: in front of my computer
Posted: 10th Sep 2005 19:51
Try changing the code so that the array + tmp loop starts from 1 instead of 0, i think i was getting the same thing at some point and found it the easiest way to get around.

If that doesnt work then it could be something else in the rest of the code, possibly an undim statement somewhere.

Hope this helps.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Sep 2005 04:19
There's nothing wrong with line 365, so the fact that you are using element 0 of the array is unlikely to be the cause of the problem.

In fact, the chances are that the problem isn't even on that line.

Try temporarily changing your Sync On to Sync Off and running your program again. You can turn it back on later when/if you fix the problem.

It will run more slowly, but press the Tab key again and see what line it says the error is on. Chances are it will be a different line and you'll see the problem.

TDK_Man

Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 11th Sep 2005 13:08 Edited at: 11th Sep 2005 13:13
Syncing didn't work so I tried running it in walkthrough - (which took ages). It came up with
Quote: "Runtime error 1 [broke nested subroutine. Cannot resume program after CLI usage.]"

it stopped on line 367. which is


Now I'm just confused.

[EDIT]And I tried getting rid of the zeros and that didn't work

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Sep 2005 14:56 Edited at: 11th Sep 2005 14:57
Quote: "Syncing didn't work"


Not sure if you didn't understand me, or you did - but didn't explain what you did properly.

When Sync is turned ON, DB doesn't always report the line that the error is on properly, so you turn Sync OFF, (or remove the Sync On line completely).

When you run it then, the real error line number is often shown.

[Edit]I assume you are using DBP?

TDK_Man

Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 11th Sep 2005 17:16
I am using DBpro. I never used sync anyway my program runs fast enough without.

[url=http://www.cretinous.co.nr/]
[/url]

Login to post a reply

Server time is: 2024-09-24 03:26:36
Your offset time is: 2024-09-24 03:26:36