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 / could not close nest at line 272

Author
Message
RainShadow
21
Years of Service
User Offline
Joined: 19th Jun 2003
Location:
Posted: 5th Jul 2003 08:02
The subject line is the error I get when I try to compile a simple text based rpg I'm doing. Seems simple enough, but I just can't find the open loop

The line it calls out is the last line of the program, "endfunction." Posting the function as a code snipet.

Suggestions are much appreciated
RainShadow
21
Years of Service
User Offline
Joined: 19th Jun 2003
Location:
Posted: 5th Jul 2003 08:15
*grump*
Had an idea; moved the function to earlier in the program, and the last line still generates the error. So.. gotta be earlier in the program..

here's the whole thing:

Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 5th Jul 2003 09:22
Only way to find the problem is to try and match up all your If's with EndIf's. Fortunately you've tabbed everything correctly and it's set out nice.

You might want to put a marker next to each If and EndIF you match up so you don't match 2 If's to the same EndIf by accident. In any case, I had a quick skim over it and found your problem:



You're missing an EndIf in there. It should be:



I have you to thank though because when skimming over the code it's easy to pick up where the tab didn't go back in properly. Oh yeah, you also have a couple other syntax errors in there that doesn't let it compile properly but the nesting is correct now.

"Computers are useless they can only give you answers."

Login to post a reply

Server time is: 2024-11-24 20:22:53
Your offset time is: 2024-11-24 20:22:53