[From string (line 5) ] @startuml !global $table = "|= Field1 |= Field 2 |" !function $row($value1, $value2) %set_variable_value("$table", %get_variable_value("$table") + " \n | " + $value1 + " | " + $value2 + " |") !endfunction ^^^^^ This function does not have any !return directive. Declare it as a procedure instead ?