your 'pan' variable is an integter, so adding 0.3 won't do anything: in "pan+0.3" pan is converted to a float, and then it adds add 0.3, which once converted back to an integer (in oreder to affect it to 'pan' again) gives the same result.
Do "Global pan#=0" (same for volume BTW). Simple :)
Do "Global pan#=0" (same for volume BTW). Simple :)