Thank you for your suggestion, JCL.
I'm not familiar yet with this sprintf function, so I had to look it up.
I've tried the following simplified code, but now it seems that there's a hard limit for the number of individual arguments from the sprintf function: 123 max. Is this correct?
Once I try to compile my script with more arguments, it results in syntax error with a reference to the sprintf function.
function run()
{
char buffer[2000];
int DS = 1500;
string name = "DataExport.csv";
if(is(FIRSTRUN))
for(i=0; i < 10; i++)
{
sprintf(buffer,"n%i,etc..", DS, etc..);
file_append(name, buffer);
DS = DS - 1;
}
}