Page 1 of 1 1
Topic Options
#72494 - 2003-01-09 11:43 AM Kix v2.33 script
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
Hi all!

Got a little problem...

I'm trying to make a bootable Cd, with a "kix-menu".
And since it's a DOS enviroment I try to run this with kix 2.33
(can I use a newer version?)

The problem is that I get This:
"Script ERROR: LABEL not found !"
"Endif"

I have checked the labels and the quotations, but I can't find anything wrong.

Can anyone find out what's wrong with this:

code:
 
Break OFF
$C = "a:\COMMAND.COM /E:1024 /C "
$1 = "A:"
$2 = "C:"
$5 = "meny"
$6 = "form"
$7 = "inst"
$8 = "prompt"
$9 = "eof"
Sleep 5
CLS

?
?
? "Ange vilken enhetsbokstav cd-spelaren har."
Get $cdr


$cdr = $cdr + ":"
$ram = %RAMD% + ":"

:meny
CLS
?
?
? "V„lj!"
?
?
? "1. Formatera C:\ och installera Windows 98."
?
? "2. Installera Windows 98 ovanp† en gammal installation."
?
? "3. G† till MS-DOS prompten. (C:\)"
?
? "Nr. " Get $3

If $3 = "1"
Goto $6
EndIf

If $3 = "2"
Goto $7
EndIf

If $3 = "3"
Goto $8
EndIf

:form
CLS
?
?
? "„r du s„ker?"
? "Det h„r kommer att RADERA ALLT som finns p† H†rddisken."
?
? "Tryck p† j eller n." Get $4

If $4 = "j"
Go $1
Shell $C + "format C: /Q"
Shell $C + "Copy " + $cdr + "\sys\io.sys " + $ram + "\ > NUL"
Shell $C + "Copy " + $cdr + "\sys\msdos.sys " + $ram + "\ > NUL"
Shell $C + "Copy " + $cdr + "\sys\command.com " + $ram + "\ > NUL"
Shell $C + "Copy " + $cdr + "\sys\drvspace.bin " + $ram + "\ > NUL"
Shell $C + $ram +"\sys c:"
Go $2
Shell $C + "md windows"
CD windows
Shell $C + "md options"
CD options
Shell $C + "md cabs"
CD cabs
Shell $C + "md Win98"
CD Win98
Go $cdr
CD Win98
CLS
?
?
? "V„nta... Filkopiering p†g†r"
Shell $C + "Copy *.* c:\Windows\options\cabs\win98 > NUL"
Shell $C + "Copy " + $cdr + "\sys\Start.bat c:\ > NUL"
CLS
?
?
? "Ta ur Cd-skivan och starta om datorn."
?
? "N„r datorn har startat om skriver du Start vid prompten och trycker p† Enter."
?
? "OBS! RADERA C:\start.bat efter att Windows 98 „r installerat."
?
?
? "tryck p† valfri tangent..."
CLS
Goto $9
EndIf

If $4 = "n"
Goto $5
EndIf

:inst
Go $cdr
Shell $C + $cdr + "\win98\install /iq /iw /ie /s /im"
Goto $9

:prompt
Go $1
CLS
Goto $9

:eof
Exit


T.I.A

Top
#72495 - 2003-01-09 11:49 AM Re: Kix v2.33 script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not sure, but if I remember correctly you can't use vars as label-names.
_________________________
!

download KiXnet

Top
#72496 - 2003-01-09 01:29 PM Re: Kix v2.33 script
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
100% Correct !

Do use goto/gosub "Label" instead of goto $Label
(Not sure about execute() but hey ... )
hth

J.
_________________________



Top
#72497 - 2003-01-09 01:33 PM Re: Kix v2.33 script
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
Got this from the manual:

$string = “end”
GOTO $string

But I actually tried it "the right way" first and when that didn't work, I used the example from the manual.

The manual hinted that an error like that could be due to an missing quotation, but I cant find anything wrong.
I have tried kixstrip (wrong version) and I get no errors... [Confused]

Suggestions?

Top
#72498 - 2003-01-09 01:39 PM Re: Kix v2.33 script
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
try execute() it , not sure if this is available in 2.33 but it would look like this :

code:
$1 = "A" ;leave out the ':' (better in my opinion as this is a Label Indicator)
$2 = "C"
$5 = "meny"
$6 = "form"
$7 = "inst"
$8 = "prompt"
$9 = "eof"

$ = execute("goto $1")

Really dunno as I don't have a copy of 2.33 nor willing to test [Wink]

[ 09. January 2003, 13:42: Message edited by: jpols ]
_________________________



Top
#72499 - 2003-01-09 01:43 PM Re: Kix v2.33 script
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
The function "execute()" doesn't exist in v2.33... [Frown]

Otherwise it was a good suggestion

Top
#72500 - 2003-01-09 01:54 PM Re: Kix v2.33 script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
there got to be something as it tries to get endif as label...

anyway, you are doing cd:

CD windows

shouldn't it be:
CD "windows"
_________________________
!

download KiXnet

Top
#72501 - 2003-01-09 03:51 PM Re: Kix v2.33 script
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
Solved it!!

Lonkero... Those quotations got half the script working, (the file copy didn't work before) but I still got that Label-error.

The problem was the :prompt-label.
It seems that v2.33 can't handle a label that is more than 5 characters long.
I changed the label to :prom and now it works.

Thanks guys!

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1376 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.17 seconds in which 0.102 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org