Do you have the error message that tells you why it failed?
Your situation is pretty well set up for a loop.
If count = 1 then
contCount[1]
else if count = 2 then
contCount[1] + stuff + contCount[2]
else if count = 3 then
contCount[1] + stuff + contCount[2] + stuff + contCount[3]
...
So clearly the loop variable will be the length of your array. For each iteration, you are simply appending more stuff to your final string.
local stringvar array contCount := split(...);
local stringvar outStr := ''; //initialize empty string
local numbervar length := count(contCount);
local numbervar x;
outStr := contCount[1];
for x := 2 to length do
outStr := outStr & Chr(13)+Chr(10) & contCount[x];
outStr;
You may condense the code to save on resources if necessary. Note that although I don't do any error-checking, if the starting number for your for loop is greater than the end, it won't execute, so it is fine.
Edited by Keikoku - 08 Apr 2011 at 2:51am