Much better tank handling. Thanks.
Btw. the error is still there, happens when you travel to space platform. Apparently the player.driving is true, but player.vehicle is nil.
Fixed it by changing the condition on line 13 to player.driving==true and player.vehicle.