mIRC Homepage
Posted By: pheonix /bread - 13/09/03 07:41 PM
Code:
alias song {
  var %mp3.dir $sdir(c:\,select an mp3 directory),%mp3
  .echo -q $findfile(%mp3.dir,*.mp3,1,%mp3 = $nopath($1-))
  bread $+(",%mp3.dir,%mp3,") 1 10 &songname
  return $bvar(&songname,1,$bvar(&songname,0))
}

the bread bit returns invalid parameters shocked,anyone know why?
Posted By: r0ck0 Re: /bread - 13/09/03 07:52 PM
Code:
alias song {
  var %mp3.dir [color:red]$sdir(c:\,select an mp3 directory)[/color]
  .echo -q $findfile(%mp3.dir,*.mp3,1,[color:red]var[/color] %mp3 = [color:red]$1-[/color])
  bread [color:red]$+(",%mp3,")[/color] 1 10 &songname
  return $bvar(&songname,1,$bvar(&songname,0))
} 
Posted By: pheonix Re: /bread - 13/09/03 07:59 PM
makes no difference, if you use var %var at the start of a script, you can use: %var = test later on...
Posted By: r0ck0 Re: /bread - 13/09/03 08:02 PM
then why does the above code not work when I remove it?
Posted By: pheonix Re: /bread - 13/09/03 08:15 PM
neither work for me....., 6.1
Posted By: r0ck0 Re: /bread - 13/09/03 08:18 PM
I tried it in 6.1 and it worked .. try this one
Code:
alias song {
  var %mp3 = $findfile($$sdir(c:\,select an mp3 directory),*.mp3,1)
  if (!%mp3) return
  bread $+(",%mp3,") 1 10 &songname
  return $bvar(&songname,1,$bvar(&songname,0))
}
© mIRC Discussion Forums