Error 5. Argument #1 has incorrect type (the function expects different argument type here)

This error occurs when argument passed during function call has invalid type. For example when you pass string instead of array

MA( "test", 5 ); // wrong, Moving average expects array as first argument
AddColumn("Test", "Caption"); // wrong, AddColum expects array as first argument

AddTextColumn("Test", "Caption"); // correct, AddTextColumn expects text