when using the following code in my function, I'm getting errors. Is it possible to set a variable and then use it in a function as follows?

if OBJECT_ID ('tvf_Inline_Te st') is not null
drop function tvf_Inline_Test
go
create function tvf_Inline_Test (@vstrDate char(15),
@VSTRDTYR char(15),
@mydatevar char(15),
@thismo as char(15))
set @thismo = right ('00'...