I opened a 'New Query' window in SSMS. I pasted the following code (well this is a simplified version but throws the same error as the real version).
Create function dbo.GetFull (@dbName varchar(100)) Returns double As -- <------------- underlined in red. Begin Declare @PercentFull double select @PercentFull = 0 Return @PercentFull End go