Applescript error -1708 when calling a function

Solution 1:

It was a problem with the scope. This question got me on the right way. I needed to change the call to the subroutine to

my silentVolume (tmpDur)

and then now works as expected. Leave it here as a future reference for anyone googling error -1708.