Code not working properly [Solved]

Hey, So I have a problem with my code. It won’t do what I think it should. my blocks:

I have debugged that my variables are correct. Var1 = hi. Var 2 and 3 = 1. The problem I am facing is that it outputs 0 instead of 2. Does anyone know a solution?


The function it is in: