Getting the following message:
quote:
ERROR : array reference out of bounds!
Script: C:\!Kix\newpkg\install.KIX
Line : 21
Line 21 is >> $kixfl[2]='kx16.dll'
Here is the code at this point:
code:
DIM $max,$kixfl[$max+1] ; vs 3.10
$tmp=ExpandEnvironmentVars('%tmp%\')
$srcdir=@curdir+'\'
$destdir=Substr('%WINDIR%',1,3)+'Scripts\'
$msg=join(split(@kix,'.'),'')
IF Exist($destdir)=0
MD $destdir
ENDIF
IF Len($destdir)=0
$destdir=@lanroot
ENDIF
IF @inwin=1
$max=2
ELSE
$max=5
ENDIF
$kixfl[0]='kix'+$msg+'.ok'
$kixfl[1]='kix32.exe'
$kixfl[2]='wkix32.exe'
$kixfl[3]='kx16.dll'
$kixfl[4]='kx32.dll'
$kixfl[5]='kx95.dll'
$firstinst='yes'
IF Exist($destdir+$kixfl[0])
$firstinst='no'
ELSE
DEL $destdir+'kix*.ok'
ENDIF
$updinfo=''
$i=1
WHILE $i <= $max
$srcfl=$srcdir+$kixfl[$i]
$destfil=$destdir+$kixfl[$i]
IF Exist($destfil)
$rc=SetFileAttr($destfil,128) <> 0
ENDIF
IF Exist($srcfl)
IF GetFileSize($srcfl) <> GetFileSize($destfil) OR
GetFileTime($srcfl) <> GetFileTime($destfil) OR
GetFileVersion($srcfl,'filedescription') <> GetFileVersion($destfil,'filedescription') OR
GetFileVersion($srcfl,'fileversion') <> GetFileVersion($destfil,'fileversion') OR
GetFileVersion($srcfl,'internalname') <> GetFileVersion($destfil,'internalname') OR
GetFileVersion($srcfl,'language') <> GetFileVersion($destfil,'language') OR
GetFileVersion($srcfl,'originalfilename') <> GetFileVersion($destfil,'originalfilename') OR
GetFileVersion($srcfl,'productname') <> GetFileVersion($destfil,'productname')
COPY $srcfl $destfil /h
IF @ERROR=0
$upok='yes'
ELSE
$upok='no'
ENDIF
$updinfo=$updinfo+' +'+$kixfl[$i]
ELSE
$updinfo=$updinfo+' ='+$kixfl[$i]
ENDIF
ENDIF
$i=$i+1
LOOP
IF $upok='yes'
$state='install complete at '
$info=$state+@date+' '+@time+' '+$updinfo
ELSE
$state='install incomplete at '
$info='update kix'+$message
IF Exist($destdir+$kixfl[0])
DEL $destdir+$kixfl[0]
ENDIF
ENDIF
$rc=WriteProfileString($dfl,'KiX','KiX release',@producttype+' -> kix '+@kix)
$rc=WriteProfileString($dfl,'KiX','KiX',$info)
IF Exist($destdir+'kix'+$msg+'.ok')
EXIT(0)
ELSE
EXIT(1)
ENDIF
Thanks,
Kent