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.

DarkBASIC Discussion / Nestling Stack Overflow problems

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 9th Apr 2006 08:54 Edited at: 9th Apr 2006 08:55
Getting a problem Here I either get nestling error at line 169 or if I put a loop at the end of the code I get a Stack overflow at line 32 error, wht is going wrong here? I adapted the code from some code Arkeli gave me as I was trying to work out how to get in and out of vehicles woth pilots or drivers
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 9th Apr 2006 11:20 Edited at: 9th Apr 2006 11:22
I see DO but not LOOP, and stack overflow means you keep calling a subroutine over and over but never returning from it, so eventualy you run of stack to store all those unused return locations, try altering

do

gosub _UpdateCar
gosub _UpdatePlayer
gosub _UpdateCam
sync


to...........

do

gosub _UpdateCar
gosub _UpdatePlayer
gosub _UpdateCam
sync

loop

and it should work, you need a main loop in any code, maybe you should step back and try something more basic, looks like you may be running before you can walk.

BTW: I know Easter is coming but it`s NESTING error, not Nestling error, a nestling is a young bird in its nest, appropriate for Easter but not DB.


Dr Frankenstiens mum told him to make some new friends, not knowing where this was going to lead.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 9th Apr 2006 22:14
LOL OK Me! thanks

Login to post a reply

Server time is: 2025-05-23 18:50:52
Your offset time is: 2025-05-23 18:50:52