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 / Nesting Error

Author
Message
superSully
21
Years of Service
User Offline
Joined: 17th Oct 2003
Location: location, location, location
Posted: 23rd Oct 2003 04:42
[b]Hey uhhhhhhh:
I know i'm a newb(but this is the newb room so i'll shut up about it) but anyway. I was making a [very corny] game, in fact i still am trying to get it to work. I've looked at all of the other NESTING ERROR posts and still don't know what one is and how to find and fix one. I have a problem in my program [i know it's nothing special] that i was making just for my first origional program. the message that i get is: "SYNTAX ERROR: NESTING ERROR AT LINE 101." someone help me PLZ!
Thanks
Sully

hey this is my signature i guess
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 23rd Oct 2003 05:01 Edited at: 23rd Oct 2003 05:03
I know you're a noob, but next time, no bold

As for your code, Nestling error is when your loops/conditional staments (do,loop if,then)

Your problem is with the ifs:

you have:
"if <blah>
<do this>
"

This is wrong,
For ifs you must have the following structur (sp):
"if <blah> THEN <do this"

or:

"if <blah>
<do this>
<do this also>
endif"

or:

if <blah>
<do this>
else
<do this if blah is false (eg 2=1)>
endif

You shouldnt use do loops to check if anything but y or n is pressed:

The new code:



Observe the if statments.



I hope I helped

.....
superSully
21
Years of Service
User Offline
Joined: 17th Oct 2003
Location: location, location, location
Posted: 23rd Oct 2003 05:11
Thanx i appreciate it i'll try it. i've programmed in QBASIC B4 but that was a long time ago. Anyway thanks for your bold time. I'll b makin great games soon.

hey this is my signature i guess
superSully
21
Years of Service
User Offline
Joined: 17th Oct 2003
Location: location, location, location
Posted: 23rd Oct 2003 07:11
Hey thanks that really worked out. however i found another error in my program and began changing stuff {HIC HIC HIC dumdumdum) anyway i get the same error message and i feel kinda like a ^. ANYWAY YOUR HELP WILL BE APPRICEATID.

Matt

hey this is my signature i guess
superSully
21
Years of Service
User Offline
Joined: 17th Oct 2003
Location: location, location, location
Posted: 23rd Oct 2003 07:11
oops i forgot to put the code

hey this is my signature i guess
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Oct 2003 07:21
Quote: "
IF ASC(INKEY$())=y
GOTO yes

IF ASC(INKEY$())=n
GOTO no
"


Umm, where's your endif statement?

If you don't use then then you have to put endif to close off the if statement. So the above code should look like this.

IF ASC(INKEY$())=y THEN GOTO yes

IF ASC(INKEY$())=n
GOTO no
ENDIF


Either method would be correct.
superSully
21
Years of Service
User Offline
Joined: 17th Oct 2003
Location: location, location, location
Posted: 23rd Oct 2003 07:23
oooooooooo ic ic thanks lots later


Sully

hey this is my signature i guess
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 23rd Oct 2003 16:27
yes obviously someone failed there basic geometry class =) hehe j/k

(why do i say geometry because in there i learned about if-then statements)

http://www.freewebs.com/ingamers
Easily Confused
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 23rd Oct 2003 17:00
Quote: "I'll b makin great games soon."

A bold statement, we'll expect results

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
superSully
21
Years of Service
User Offline
Joined: 17th Oct 2003
Location: location, location, location
Posted: 24th Oct 2003 02:51 Edited at: 24th Oct 2003 02:53
Quote: "yes obviously someone failed there basic geometry class =) hehe j/k

(why do i say geometry because in there i learned about if-then statements)"


Actually I did pretty good last year in geometry last year and this year on the psat I answered and got correct all of the geometry questions. We also learned about if-then statements. i was stupid cuz I had all of the other things to worry about during my first real program besides this one:

Anyway no hard feelings, after all someday I'll look back on it and say, "geez i was stupid!!"
Later
Sully

hey this is my signature i guess
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 24th Oct 2003 03:57
I look back on myself and do think, man I was REALLY stupid!!

.....

Login to post a reply

Server time is: 2024-11-25 14:41:25
Your offset time is: 2024-11-25 14:41:25