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 / why is this throwing up a "can't close nest" error?

Author
Message
DLS
20
Years of Service
User Offline
Joined: 6th Jul 2004
Location: Wet And Windy Britain
Posted: 18th Oct 2004 17:52 Edited at: 18th Oct 2004 19:03
i got a major problem with my code that i can't seem to find. It all seems to be alright but when i try and compile it i get this error.

Quote: "#100012: Could not close nest at line 396"


i know that 396 is the last line and when i moved some code blocks around it still says the last line. i don't know if its the project or not coz i started a new one and it still gives the same error.

please help coz i'm really baffled

[Edit]
i've posted the code too. forgot to tell u

[Edit AGAIN]
damn edit heres the code the easier way


(just upgraded) system specs: AMD XP 3000+, 512Mb DDR333, nvidia ge-force FX 5600 128MB, 1x8Gb & 1x40Gb HHD, 52x CD drive, DVD+RW 4x, Sound Blaster 128.... all in a Nokia 8310 case :0D
RalphY
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: 404 (UK)
Posted: 18th Oct 2004 19:49 Edited at: 18th Oct 2004 19:51
Could not close nest means you missed an endif, forgot to close a case statement or you forgot a return, check through your code and make sure every case, if statement and gosub is closed at some point.

I just flicked through your code, but it appears theres no return at the end of this part, you go straight into a function decleration so I would check that out.



Hope this helps.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 18th Oct 2004 21:58
There has to be a return statement for all labels used with gosub. Also every one of the subs like this are illegal.

you have for a = 1 to something with no next a after it.
And move the function to the very bottom of the program.
Something like this.


DLS
20
Years of Service
User Offline
Joined: 6th Jul 2004
Location: Wet And Windy Britain
Posted: 19th Oct 2004 06:19 Edited at: 19th Oct 2004 06:25
@ Lost in Thought

i think u might of just hit the nail on the head. i didn't look for that. but wouldn't it of pulled me up on that and not at the end of the code.

@ RalphY

possibly. i'll try anything. just funny y it now don't work when it did a bit back

[Edit]
L.I.T you was right. suprised myself there. can't remember last time i made a mistake like that

(just upgraded) system specs: AMD XP 3000+, 512Mb DDR333, nvidia ge-force FX 5600 128MB, 1x8Gb & 1x40Gb HHD, 52x CD drive, DVD+RW 4x, Sound Blaster 128.... all in a Nokia 8310 case :0D
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Oct 2004 10:49
Glad you got it working.

Login to post a reply

Server time is: 2024-11-27 13:04:23
Your offset time is: 2024-11-27 13:04:23