20.04.2014, 14:24
You are changing the value of tempvar into each one of the if clauses, so when it goes into the first if, it takes the value 1, so it gets into the second if clause, and that repeats until it finishes with all if clauses.
The solution to this problem would be using else if clauses or just a switch.
The solution to this problem would be using else if clauses or just a switch.