I have the function in a CFC that is supposed to check some form variables and
then if they are all OK to send an email, it returns a structure which says
whether the form variables were OK and if not it returns a list of the errors.
I keep getting the following error:

You have attempted to dereference a scalar variable of type class
java.lang.String as a structure with members.

It is refering to the following line:

<cfset Result.ErrorMessages = Errors>

However if I comment it out I get a different error:

The value returned from function FormSubmit() is not of type struct

Which is on the page calling the function. I have attached the full function
below and any help would be greatly appreciated.

<!--- FormSubmit () --->
<cffunction
name="FormSubmit"
access="public"
returntype="struct"
hint="This will deal with the contact email from my site.">

<!--- fName Argument --->
<cfargument
name="fName"
type="string"
required="yes">

<!--- sName Argument --->
<cfargument
name="sName"
type="string"
required="yes">

<!--- Email Argument --->
<cfargument
name="Email"
type="string"
required="yes">

<!--- ConfirmEmail Argument --->
<cfargument
name="ConfirmEmail"
type="string"
required="yes">

<!--- Subject Argument --->
<cfargument
name="Subject"
type="string"
required="yes">

<!--- Message Argument --->
<cfargument
name="Message"
type="string"
required="yes">

<!--- create structure for result --->
<cfset Result = StructNew()>
<cfset Result.Complete = False>

<!--- create an Errors List --->
<cfset Errors = "">

<!--- check names --->
<cfif NOT CheckNames(ARGUMENTS.fName, ARGUMENTS.sName)>
<cfset Errors = ListAppend(Errors, "Full Name")>
</cfif>

<!--- check email --->
<cfif NOT CheckEmail(ARGUMENTS.Email, ARGUMENTS.ConfirmEmail)>
<cfset Errors = ListAppend(Errors, "Two identical and valid emails")>
</cfif>

<!--- check subject --->
<cfif NOT CheckText(ARGUMENTS.Subject)>
<cfset Errors = ListAppend(Errors, "Email Subject")>
</cfif>

<!--- check message --->
<cfif NOT CheckText(ARGUMENTS.Message)>
<cfset Errors = ListAppend(Errors, "Email Message")>
</cfif>

<!--- if the Array is Empty then send email --->
<cfif ListLen(Errors) IS 0>
<!--- send email --->
<cfinclude template="../Assets/Templates/ContactEmail.cfm">

<!--- set as success --->
<cfset Result.Complete = True>
</cfif>

<!--- add list to structure --->
<cfset Result.ErrorMessages = Errors>

<!--- return result --->
<cfreturn Result>
</cffunction>

Thanks.