I think this is not possible. I would suggest Make two functions with 3 and 4 parameters and write it like this in script.
Code:
If Condition
Call Fn1(Var1, Var2, Var3)
Else
Call Fn2(Var1,Var2,Var3,Var4)
