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 / index array out of bounds?

Author
Message
mbaucco
18
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 8th Nov 2005 14:50
Hello,

I wrote this code last night while trying to work out how to handle objects in the game I am working on. The code runs, but I keep getting an error messagewhen it writes the file (index array out of bounds). As far as I know, this code should cycle through the elements and stop when the index is no longer valid. I used a while loop so it would check before processing any code, so I am not sure why it would try to go through an invalid element.

Thanks,
Matt
mbaucco
18
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 8th Nov 2005 16:41
ok, not sure why it did not put the code in, so here it is:

Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 8th Nov 2005 17:24
use the Code tags because that source button doesnt work....so please try again

Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 9th Nov 2005 01:24
At some point in time whatever variable your using goes above the maximum number of indexes in your array. This is most likely caused by one of the following problems.

1. A loop runs past the limit. Change the loop.

2. More likely is that arrays in DB go from 0 to the number in paranthesis when you declare the array. You probably just need to add another number to the max indexis.

Login to post a reply

Server time is: 2024-09-24 07:23:00
Your offset time is: 2024-09-24 07:23:00