trouble assigning array values in cfscript function
I'm trying to pass an array to a cfscript function and assign values to it. When I see if the value was assigned right, I get an error saying that I'm trying to dereference a scalar.
function g(q,recsq,arr) // q is a query name, recsq is the number of rows in q,arr is an array name
{
evaluate(arr&'[1][1]='&q&'.code[1]');
writeoutput(a[1][1]);
}
g('qpr','#recsqpr#','apr');
The assigning already works if I don't try to call a function but I would like to know what I am doing wrong.