You are sending the message to wrong variable. Something like
cols = dt << get column names(string);
For(i = N Items(cols), i >= 1, i--,
If(Contains(cols[i], "Mean"),
Column(dt, cols[i] << data type("numeric")
)
);
should work. I would also rewrite the script a little (use For Each and << Set Data Type) as I think those are easier to read
cols = dt << get column names("String");
For Each({col}, cols,
If(Contains(col, "Mean"),
Column(dt, col) << Set Data Type("Numeric");
);
);
-Jarmo