mIRC Home    About    Download    Register    News    Help

Print Thread
#49222 13/09/03 07:41 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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?


new username: tidy_trax
#49223 13/09/03 07:52 PM
Joined: Jun 2003
Posts: 242
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Jun 2003
Posts: 242
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))
} 

Last edited by r0ck0; 13/09/03 08:07 PM.
#49224 13/09/03 07:59 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
makes no difference, if you use var %var at the start of a script, you can use: %var = test later on...


new username: tidy_trax
#49225 13/09/03 08:02 PM
Joined: Jun 2003
Posts: 242
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Jun 2003
Posts: 242
then why does the above code not work when I remove it?

#49226 13/09/03 08:15 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
neither work for me....., 6.1


new username: tidy_trax
#49227 13/09/03 08:18 PM
Joined: Jun 2003
Posts: 242
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Jun 2003
Posts: 242
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))
}


Link Copied to Clipboard