Jump to content
Sign in to follow this  
Frozone212

For next nesting error persists even if a new line is used

Recommended Posts

What do i do? It keeps saying For next nesting error. None of my program lines are using for next. Those that have are fixed now. Running XB on Classic99. Ideas?

Windows 10 64 bit Nvidia GTX 1660

 

can't give a listing, no facility for that apparently

I can however give a video.

2022-01-02_15-43-29.mkv

  • Confused 1

Share this post


Link to post
Share on other sites

Using Classic99, type

LIST "CLIP"

This will put the program onto the Windows clipboard.

 

  • Again, as pointed out in your previous thread, statement separators in TI Extended BASIC are "::" not ":".
  • You can have multiple variables in a single DIM: ie DIM L(1),Y(2),X(2).
  • Arrays with less than 10 elements are implied DIMensioned after the first use in the program.
  • LET is unnecessary for variable assignments.  LET is implied.
  • Arguments in CALLs like GCHAR should not be enclosed in quotes.
  • Only the literal (text) argument of CHAR needs to be enclosed in quotes: ie CALL CHAR(191,"21E1FFF31217")

 

Anyway, I cannot watch 37 minutes of typing and errors.  As I skim through your video, I see a lot of simple typing and syntactical errors, the later of which the Extended BASIC manual and its examples would quickly help resolve.  As well, there is a litany of Extended BASIC programming examples here.

  • Like 2

Share this post


Link to post
Share on other sites

sorry, here:


100 FOR ROW=1 TO 39:FOR COL=1 TO 3:NEXT ROW:NEXT COL
110 PRINT "GHOSTBUSTERS:THE TEXT ADVENTURE FOR THE TI994A"
120 CALL CLEAR
130 CALL SCREEN(15)
140 CALL CHAR(100,"12536821")
150 CALL CHAR(99,"123443212")
160 CALL CHAR(98,"224432158")
170 PRINT "DO YOU WANT INSTRUCTIONS?"
180 DIM N$(4)
190 INPUT A$
200 IF A$="Y" THEN 230
210 IF A$="N" THEN 310
220 REM INSTRUCTIONS
230 PRINT "TYPE HELP FOR MORE INFO BUT THE BASICS ARE ALLOWED: LOOK, TALK TO, PICK UP FIRE AND PK"
240 IF A$="HELP" THEN 360
250 GOTO 310
260 LET B=1:REM GOZER DATA
270 CALL GCHAR(1,12,14)
280 CALL CHAR("191,21E1FFF31217")
290 PRINT "LEVEL 1: THE MUSEUM":CALL CHAR(121,"1FFE21FF31327")
300 REM DONE
310 REM LEVEL DATA
320 LET G=3
330 PRINT "YOU MUST CAPTURE";G;"GHOSTS"
340 CALL CHAR(128,"E21138577FFF321E")
350 REM DONE, ON TO CHARACTERS
360 PRINT "WHO DO YOU WANT TO BE?"
370 INPUT NAME$
380 REM NO FOR NEXT ISSUE, THIS BASIC SUCKS

 

  • Like 1

Share this post


Link to post
Share on other sites

@Frozone212 Other than the answers I already gave, line 270 is incorrect syntax: GCHAR requires a variable to store the result.

 

Oh, then this:

 

100 FOR ROW=1 TO 39:FOR COL=1 TO 3:NEXT ROW:NEXT COL

First, what is this supposed to do?  You have nothing happening in these loops.  Secondly, you are closing your loops out of order.  ie  FOR A... :: FOR B... :: NEXT B :: NEXT A

  • Like 3

Share this post


Link to post
Share on other sites

If a FOR-NEXT loop is closed out of order, it will give the FOR-NEXT error.  I suppose one thing TI could have done is make sure the computer specifies which line it found the offending article, but it doesn't.  That's not something we can do anything about now, we're about 41 years too late.  

 

What you need to do and I say this with the utmost respect is, get some patience and alter your attitude.  Don't come on here with "this sucks" or "that sucks" just apply yourself properly to what you are doing ,read the manuals for the syntax and also have a look at the Classic99 manual.

 

 

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, Frozone212 said:

if it appears i am an idiot

RTFM'ing can produce amazing results.

  • Like 3

Share this post


Link to post
Share on other sites
26 minutes ago, Retrospect said:

If a FOR-NEXT loop is closed out of order, it will give the FOR-NEXT error.  I suppose one thing TI could have done is make sure the computer specifies which line it found the offending article, but it doesn't.

To get really confusing, Commodore CBM BASIC does not require a variable in your NEXT statement. It infers which loop you want to close.  I suspect all other dialects of Microsoft BASIC do this.

  • Like 1

Share this post


Link to post
Share on other sites
12 minutes ago, OLD CS1 said:

To get really confusing, Commodore CBM BASIC does not require a variable in your NEXT statement. It infers which loop you want to close.  I suspect all other dialects of Microsoft BASIC do this.

Yeah, all the ones I used were like that. But in either case, you can't overlap for..next loops. The innermost loop must finish before the next most outer one. TI's BASICs are just unusual in that they check that sort of thing before they start running.

 

It takes time to learn. Keep pushing at it. When it finally works, that feeling will be amazing. ;)

 

  • Like 5

Share this post


Link to post
Share on other sites

Come back when your attitude changes.

  • Like 2
  • Thanks 4
  • Haha 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...