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.

Author
Message
Kryogenik
16
Years of Service
User Offline
Joined: 22nd Sep 2009
Location: Heidelberg, Germany
Posted: 16th Jun 2010 19:55 Edited at: 16th Jun 2010 19:56
Here's my problem. Whenever I start my game, it runs fine. I run around and shoot at stuff, and at random times, it tells me that array subscript is out of bounds and crashes, basically that I used to high or low a number referencing an array. The way I have my code set up is like this. I have a level1 function in the main source. Then I have a loadlevel function in an included file that loads the level from a text file in the level1 function, which uses a bunch of functions. Functions within functions, etc. Because of this, when it tells me what line an error occurred, it doesn't give me the right one. It says my problem is at a piece of code I forgot to get rid of for newton, which isn't used and doesn't have anything to do with an array. Usually for things like this, I make an error on purpose, like making and object that already exists, around the code so I can eventually find where the problem is, but since the error doesn't happen on startup, this wouldn't work. So how would I go about finding the array thing I did wrong? It doesn't even tell me the array I tried to reference, so what can I do? Thanks in advance.

Codesurge is so awesome, thanks Hyrichter.
Sepnon
16
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 16th Jun 2010 20:16 Edited at: 16th Jun 2010 20:16
well..without seeing the code we're helping blind
did you try Edit => Advanced => Go To Project Line?
Pay attention to what you was doing at the moment of the error, which arrays were being used, etc..
Make a debug (DBP's or texts over the screen)
Kryogenik
16
Years of Service
User Offline
Joined: 22nd Sep 2009
Location: Heidelberg, Germany
Posted: 16th Jun 2010 20:39
Found the problem, sort of. I tried what you said and paid attention to what I was doing, but no matter what I would do, it would happen, right down to the time it happened, about 5 seconds after it starts. So I looked for a function that only does stuff occasionally, which was my path finding function. After disabling, it didn't crash. Thanks for the advice, now I know where to look

Codesurge is so awesome, thanks Hyrichter.

Login to post a reply

Server time is: 2026-07-25 16:22:02
Your offset time is: 2026-07-25 16:22:02