Weird values from an int function

Just found my mistake: In function1 I checked for else if instead of else and that if was not the case anymore so it did not return anything, therefore I had these weird Numbers.