View Single Post
Old 10 February 2016, 19:54   #27
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
OH MAN I am an idiot. Sorry, I made a big mistake :P
Here's the corrected code:
Code:
assign env: ram:
assign t: ram:
doublespeed
setpatch quiet

hip hide sys:music/bb.mod
 
picboot sys:bbtmenu.gif vo on DETACH


lab main_loop
waitjoy >env:choice

if $choice eq red
   hip quit
   stoppicboot
   avail flush >nil: 
   cd games
   C:WHDLoad bubblebobblentsc.slave data=bubblebobblentsc PRELOAD
   skip exiting
   else if  $choice eq blue
             hip quit
             stoppicboot
             avail flush >nil: 
             cd games
             C:WHDLoad rainbowislands.slave data=rainbowislands PRELOAD
             skip exiting
             else if $choice eq yellow
                  hip quit
                  stoppicboot
                  avail flush >nil: 
                  cd games
                  C:WHDLoad parasolstars.slave data=parasolstars PRELOAD
                  skip exiting
                  else skip main_loop back
endif

lab exiting
endcli >NIL:
I wrote "loop " instead of "lab" :P Sorry! You should be able to catch those errors though, part of the learning.
Also DO NOT use Wordpad. It inserts invisible characters the Amiga won't like. notepad plain text always.


Arnie: "skip back " won't work, the label goes first, according to AmigaDOS reference:
Quote:
SKIP
Skips to a label when executing script files.

Format
SKIP [<label>] [BACK]

SKIP is used in scripts to allow you to skip ahead in the script to a <label> defined by a LAB statement. If no <label> is specified, SKIP jumps to the next LAB statement.

SKIP always searches forward from the current line of the file. However, when the BACK option is used, SKIP starts searching for the label from the beginning of the file. This allows SKIPs to points prior to the SKIP command.

You can only SKIP as far back as the last EXECUTE statement. If there are no EXECUTE statements in a script, you SKIP back to the beginning of the file.

If SKIP does not find the label specified, the command sequence terminates and the message Label <label> not found by Skip is displayed.
Amiga1992 is offline  
 
Page generated in 0.05514 seconds with 11 queries