Can anyone tell me why I keep getting the following error:
An error occurred while evaluating the expression:
temp = ArraySet(LineItemarray,1,6,"")
Error near line 47, column 7
the code that I am trying to run is below:
<!--- Make an array --->
<cfset LineItemArray = ArrayNew(2)>
<cfloop from="1" to="#LineItemCt#" index="itemRow">
#ListGetAT(Cust_ItmLst,ItemRow,'~')#<BR>
<!--- ArrayToList will not function properly if the Array has not been
initialized with ArraySet --->
<cfset temp = ArraySet(LineItemArray,1,6,"")>
<!--- set some elements --->
<cfset LineItemArray[itemRow][1] = "#ListGetAt(Cust_ItmLst,1,' ')#">
<cfset LineItemArray[itemRow][2] = "">
<!--- Find out where PackageSize is located in this string --->
<cfset PackageSizePOS = ListFindNoCase(Cust_ItmLst,"PackageSize:"," ")>
<cfloop from="2" to="#Evaluate(PackageSizePOS-1)#" index="ct">
<cfset LineItemArray[itemRow][2] = #LineItemArray[itemRow][2]# &' ' &
#ListgetAt(Cust_ItmLst,ct,' ')#>
</cfloop>
<cfset LineItemArray[itemRow][3] =
"#ListGetAt(Cust_ItmLst,PackageSizePOS+1,' ')#">
<cfset LineItemArray[itemRow][4] =
"#ListGetAt(Cust_ItmLst,PackageSizePOS+2,' ')#">
<cfset LineItemArray[itemRow][5] =
"#ListGetAt(Cust_ItmLst,PackageSizePOS+3,' ')#">
<cfset LineItemArray[itemRow][6] =
"#ListGetAt(Cust_ItmLst,PackageSizePOS+5,' ')#">
</cfloop>
<!--- is it an array? --->
<P>Is this an array? #IsArray(LineItemArray)#
<P>It has #ArrayLen(LineItemArray)# elements.
<P>Contents: #ArrayToList(LineItemArray)#
<!--- the array has expanded dynamically to six elements
with the use of ArraySet, even though we only set three values --->
Any quick anwsers on this would be GREATLY Appreciated.
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists