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 / cannot close my nest, not endif missing ( i think)

Author
Message
python89
17
Years of Service
User Offline
Joined: 15th Nov 2006
Location:
Posted: 15th Nov 2006 21:56
okay, why cant i close my nest?

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 15th Nov 2006 23:19
the first line looks like its a gosub and you should use "return" to end a gosub.

python89
17
Years of Service
User Offline
Joined: 15th Nov 2006
Location:
Posted: 15th Nov 2006 23:41
okay it still dosnt work for me
would you put the things that are missing in the code for me?
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 16th Nov 2006 01:14
There's nothing wrong with the code you posted. When you have nesting problems it's usually because you did something like this:



It gives a nesting error because the if/then statement didn't have an "endif" to close if/then.


To prevent nesting errors always indent your code. If you have any kind of loop use tab or space to move all code inside loops at least one space over to show it's inside the loop. And make all closing statements aligned with the beginning of the loop. Indenting also makes it easier to find bugs in your code.

Here's a small snip from one of my projects to show indenting:
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 21st Nov 2006 19:43
Nothing wrong with your code afaik.

All I got was an error along the lines of 'could not load "smiley.jpg"', and that's runtime; so it compiles fine here

What version of DBP are you using?

-=-=- Activate asshat mode. -=-=-
Warning: This post may contain bloatage.

Login to post a reply

Server time is: 2024-11-14 01:19:05
Your offset time is: 2024-11-14 01:19:05