Hi there,
Use this code.
alias err {
if ($1 == 1) {
if $exists($qt(sound.mp3)) {
splay -q $qt(sound.mp3)
}
else { echo -a Error }
}
elseif ($1 == 2) {
if $exists($qt(sound.mp3)) {
splay -q $qt(sound.mp3)
}
else { echo -a Error }
}
}
PS: if $2 == 1 will not be supported like this, you need to use if ($1) && ($2) then if ($2 == <value>) etc.. but this code I posted for you shall work.