Need help with robot arm error

hello guys need ur help on arduino sketch for robot arm
hundred times cheked the sketch but couldnt find the reason
displays next errors while compiling
robot_Arm_2.ino: In function 'void loop()':
robot_Arm_2.ino:169:5: error: a function-definition is not allowed here before '{' token
robot_Arm_2.ino:317:1: error: expected '}' at end of input
robot_Arm_2.ino:317:1: error: expected '}' at end of input

Topic split !

Dont just jump onto other peoples posts especially when the topic is not the same.
Please read the posts stuck at the TOP of the forum sections.

Bob.

Post your code and maybe people can help. I'm guessing you don't have balanced sets of '{' and '}' so auto format your code (CTRL-T) and see how it changes the indentation. That may give you a clue.