There are a few problems here.
1.
If you use $chkfile($nick $2) then $1 is $nick $2, parameters in an identifier are seperated with a comma, therefore, your code should be this: $chkfile($nick
,$2).
2.
return $true
msg %name Playing You Requested TextFileWhen return is used, mIRC exits the alias, so therefore anything after return will not be executed, to fix this just put return after the msg line.
3.
You're missing a ) on this line:
elseif ($2) && ($chkfile($nick $2) != $true {
msg $nick Sorry Invalid File }
It should be:
elseif ($2) && ($chkfile($nick
,$2) != $true
) {
msg $nick Sorry Invalid File }
4.
Not that it makes a difference most of the time, but using = instead of == can give errors sometimes, change:
if ($isfile(%file) = $true) {
To:
if ($isfile(%file) =
= $true) {
Edit: this post was in reply to your first unedited post.
Edit 2:
Try this:
on *:TEXT:!read *:*:{
if (!$2) {
msg $nick Syntax: !read File
msg $nick Example: !read readme.txt
}
elseif (!$isfile(%dir $+ $2)) { msg $nick Sorry Invalid File }
else {
msg $nick Playing you $2
play $nick " $+ %dir $+ $2"
}
}