Your function update_ball() should look like this. At the moment the last } is missing.

Code:
 
function update_ball()
{// This function updates ball
	ponged_ball.pos_x += 7*ball_speed.x*time_step;
	ponged_ball.pos_y += 7*ball_speed.y*time_step;
	
	/////////////////////////////////See if ball hit paddle/border.//////////////////////
	
	if (ponged_ball.pos_x < 0)  //If ball hits the left border on X axis
	{
		ball_speed.x = -3 - random(3);
		snd_play (beep_1, 50, 0);
	}
	else if (ponged_ball.pos_x > 620) //If ball hits the right border on X axis
	{
		ball_speed.x = 3 - random(3);
		snd_play (beep_1, 70, 0);
	}
	if (ponged_ball.pos_y < 0) //If ball hits the upper edge of the window on Y axis
	{
		ball_speed.y = -3 - random(3);
		snd_play (goal, 70, 0);
		top_score += 1;
		ponged_ball.pos_y = 0; 
	}
	else if (ponged_ball.pos_y > 450) //If ball hits the lower edge of the window on Y axis
	{
		ball_speed.y = 3 - random(3);
		snd_play (goal, 70, 0);
		bottom_score += 1;
		
	}
	
	if ((ponged_ball.pos_y > 430) && (ponged_ball.pos_y < 440) && (ponged_ball.pos_x > downed_pong.pos_x - 12) && (ponged_ball.pos_x < downed_pong.pos_x + 90))
	{//Bottom player has blocked the ball.
		snd_play (beep_1, 70, 0);
		ball_speed.x = 3 + random(3);
		ball_speed.y = 3 - random(3);
	}
	else if ((ponged_ball.pos_y < 20) && (ponged_ball.pos_y > 10) && (ponged_ball.pos_x > upper_pong.pos_x - 12) && (ponged_ball.pos_x < upper_pong.pos_x + 90))
	{
		snd_play (beep_1, 70, 0);
		ball_speed.x = 3 - random(3);
		ball_speed.y = 3 + random(3);
	}
}