This is a thread for my tank game called land raider.... It would be nice if yhe poeple here at FK would be able to help me in any delemers and point me in the right direction.

My game is a side scroller and my tank has a rotatable turret, but i cant seem to get it to stop after rotationg 180 degree's here is my code can some one tell me what i am doing wrong or a place that has somthing like this.

Code:
onClipEvent (load) {
	weopon.gotoAndStop(1);
	gotoAndStop(1);
	acceleration = 0;
	zero = 0;
	gravity = 2;
	speed = 10;
	rotation = 5;
	maxrotation = 180;
}
onClipEvent (enterFrame) {
	if (Key.isDown(Key.UP)) {
		weopon._rotation = rotation++;
	} else {
		if (weopon._rotation>maxrotation) {
			weopon._rotation = rotation--;
		}
	}