There seems to be a missing operand (+,-,*,/) in front of the first round bracket.
Maybe it would be easier to use Fluent 2021.R1 and named expressions instead of a UDF. UDF's being written in C language are no longer necessary for such algebraic operations on inlet conditions.