###User Defined Function###
_ArraytoFile

###Description###
Writes a one dimensional array to a specified file.

###Syntax###
#include <Array.au3>
_ArraytoFile (ByRef $avArray, $vFilename [, $iStartingElement = 0 [, $iWritemode = 1]])



###Parameters###
@@ParamTable@@
$avArray
	Input Array to be written to file.
$vFilename
	The full path of the file to be written to.
$iStartingElement 
	Optional: The first element in the array to start writing to file (in case the first element is the number of elements)Ex $avArrray[0] or $AvArray[1].  Default is 0
$iWritemode
	Optional: The mode to write to the file: 1 to append to end of file and 2 to erase previous contents.  Default is 1.
@@End@@

###ReturnValue###
On Success - Returns 1 and writes the array to file
On Failure - Returns 0
	@ERROR = 1 if it isn't an array
	@ERROR = 2 if it isn't one dimensional
	@ERROR = 3 if the file couldn't be opened
	@ERROR = 4 if there was an incorrect writemode value(must be 1 or 2)


###Remarks###
This function can only handle one dimensional arrays.  It writes each element of a single dimensional array as its own line in the file.

###Related###
_FileReadToArray

###Example###
@@IncludeExample@@