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 / Nesting Errors; What Are They?

Author
Message
Ole Sparky
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: United States
Posted: 26th Dec 2002 09:10
Seriously, what are nesting errors and how can I fix/get rid of them?
-Ya know how much I hate 'Stack Overload Error's?-
Thhhhhhhhhhhiiiiiiiisssssssssssss muuuuuuuuccchhh!
Mr_Insane
21
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 26th Dec 2002 09:58
Nesting errors are when you leave a Next Test without the For Test = 1 to 5.

Or if you don't put an endif in your cmd. line. Becareful how you nest things..

You must have the same numbers of If (expression), and ENDIF. Same thing goes with FORs and NEXTs, and even WHILE, and ENDWHILES. If you don't have the same of the start and ends, thats how you get nesting errors.

p.s. "IF (expression) then (condition)" does not count as nesting.
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Dec 2002 12:53
And what out, DBPro wont always return the correct error number..

Good news everyone! I really am THAT good...
Oh my, yes...
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 26th Dec 2002 17:35
This would return a nesting error

do
print "Error"

Nesting Error at Line 3

There is no loop

If keystate(16)=1
print "end of game"
end

theres no endif

ETC.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 26th Dec 2002 19:02


The more you see, the more you know.
The more you know, the more you see.
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 26th Dec 2002 23:49
If you need any more help, just post the problem causing snippet here. As you can see, many are on hand to help you

Whatever I did I didn't do it!
Ole Sparky
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: United States
Posted: 27th Dec 2002 01:56
Ah, ok. Thanks, everyone.

-Ya know how much I hate 'Stack Overload Error's?-
Thhhhhhhhhhhiiiiiiiisssssssssssss muuuuuuuuccchhh!

Login to post a reply

Server time is: 2024-03-28 20:22:29
Your offset time is: 2024-03-28 20:22:29