int mvmnt;
int position = 10050
int movement (int a, int b){
int x;
switch(b){
case 1:
x = a - 100;
break;
case 2:
x = a + 1;
break;
case 3:
x = a + 100;
break;
case 4:
x = a - 1;
break;
}
return x;
}
You are calling the movement function correctly, but you aren't assigning the result it gives to any variable, so it just enters the function then leaves.
One way to fix this would be to change line 5 to position = movement(position, mvmnt);
Then position will be updated to how it is meant to be.