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 / Help me with this before I kill my computer

Author
Message
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 16th Jan 2006 18:36
I keep getting "cannot close nest" and I'll be damned if I can find it. Please help
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 16th Jan 2006 18:46 Edited at: 16th Jan 2006 18:52
I think your problem is here:

Using goto inside a nest is a bad idea, try this instead:

[EDIT] oh found some more:

take out the ` before that ENDIF because you are not using a THEN on that first IF

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 16th Jan 2006 19:40
This is why you should indent your code - easier to spot things like this...

...maybe one day I'll finish a project
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 16th Jan 2006 20:02
Thanks for looking, but it didn't help. Now where's that mallet?
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 16th Jan 2006 20:23 Edited at: 16th Jan 2006 20:24


Uncomment that last endif. I don't know if this would be a problem or not:


It may be trying to parse the if inside that comment. Try taking it out and seeing what happens.

edit: You should also indent your code. Also, whenever you write an if, for, do, etc. always write the closing endif, next, loop before writing any code inside. This will cut down greatly on such problems.

hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 16th Jan 2006 20:51
OK, you have two stray repeats in your code. Do what I showed you and remove those repeats, and it will compile. I don't know if it will do what you want it to, but at least it will compile.

StevetS
20
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 16th Jan 2006 21:50
Quote: "You should also indent your code. Also, whenever you write an if, for, do, etc. always write the closing endif, next, loop before writing any code inside. This will cut down greatly on such problems."


This saves a LOT of time, esp if you've got a lot of nested ifs, for-nexts and gosub-returns floating around!
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 16th Jan 2006 22:57
Thanks everyone. It compiles now, but won't play. I think I'll kick the cat and then start writing something simple - like Halo 3

Login to post a reply

Server time is: 2024-09-24 13:29:49
Your offset time is: 2024-09-24 13:29:49