That's not C++: if looks more like Python, which is a very different language.
Even as Python however, there are at least two things wrong with it:
1)
def
requires a colon to indicate the end of the definition:
Python Functions[
^]
2) In Python, indentation is both significant, and very important:
Python Indentation[
^]
Without it, that code not only won't run, but if wouldn't do what you wanted it to anyway if it did ...
And since none of the parameters are used in the code you do show, we have no idea what error(s) you are getting, and we have no idea what you intended that code to do, we cannot help you any further ...