javascript missing a bracket can't find please assist

I 'm missing a bracket somewhere and I can't seem to find it I was hoping someone on EE can see it.

  var QueryString = function () {
	var query_string = {};
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) {
		var pair = vars[i].split("=");
		// If first entry with this name
		if (typeof query_string[pair[0]] === "undefined") {
			query_string[pair[0]] = pair[1];
		// If second entry with this name
		} else if (typeof query_string[pair[0]] === "string") {
			var arr = [ query_string[pair[0]], pair[1] ];
			query_string[pair[0]] = arr;
		// If third or later entry with this name
		} else {
			query_string[pair[0]].push(pair[1]);
		}
	} 
	return query_string;
} ();  
var xmlPath = '/xml/mlb/scores/real';
  var xmlGameID = QueryString.gameID;
  var srcFieldTeamLogo;
  var playerImage;
  var intPosID = {
	'P': {
		pos: 'Pitcher',
		id: 0,
		name: 'unknown'
	},
	'C': {
		pos: 'Catcher',
		id: 0,
		name: 'unknown'
	},
	'FB': {
		pos: 'First Base',
		id: 0,
		name: 'unknown'
	},
	'SB': {
		pos: 'Second Base',
		id: 0,
		name: 'unknown'
	},
	'SS': {
		pos: 'ShortStop',
		id: 0,
		name: 'unknown'
	},
	'TB': {
		pos: 'Third Base',
		id: 0,
		name: 'unknown'
	},
	'LF': {
		pos: 'Left Field',
		id: 0,
		name: 'unknown'
	},
	'CF': {
		pos: 'Center Field',
		id: 0,
		name: 'unknown'
	},
	'RF': {
		pos: 'Right Field',
		id: 0,
		name: 'unknown'
	},
	'HPUmpire': {
		pos: 'Home Plate Umpire',
		id: 0,
		name: 'unknown'
	},
	'TBUmpire': {
		pos: 'Third Base Umpire',
		id: 0,
		name: 'unknown'
	},
	'SBUmpire': {
		pos: 'Second Base Umpire',
		id: 0,
		name: 'unknown'
	},
	'FBUmpire': {
		pos: 'First Base Umpire',
		id: 0,
		name: 'unknown'
	}
  };



stadiums = {
	"wrigley field":"wrigley.gif",
	"comerica park":"comerica.gif" ,
	"yankee stadium":"yankee.jpg" ,
	"shea stadium":"shea.jpg" ,
	"angel stadium of anaheim":"angel.jpg" ,
	"rangers ballpark in arlington":"angel.jpg" ,
	"at&t park":"attpark.jpg" ,
	"citizens bank park":"citizenballpark.jpg" ,
	"coors field":"coors.jpg" ,
	"busch stadium":"busch.jpg" ,
	"oriole park at camden yards":"camden_baltimore.jpg",
	"dodger stadium":"dodgers.jpg" ,
	"chase field":"chasefield.jpg" ,
	"tropicana field":"tropicana.jpg" ,
	"great american ball park":"greatamerican.jpg" ,
	"kauffman stadium":"kauffmanstadium.jpg" ,
	"mcafee coliseum":"mcafeecoliseum.jpg" ,
	"hubert h. humphrey metrodome":"metrodome.jpg" ,
	"metrodome":"metrodome.jpg" ,
	"miller park":"millerpark.jpg" ,
	"minute maid park":"minutemaid.jpg" ,
	"nationals park":"nationalspark.jpg" ,
	"petco park":"petcopark.jpg" ,
	"pnc park":"pncpark.jpg" ,
	"progressive field":"progressive.jpg" ,
	"rogers centre":"rogerscentre.jpg" ,
	"safeco field":"safecofield.jpg" ,
	"turner field":"turnerfield.jpg" ,
	"dolphin stadium":"dolphinstadium.jpg" ,
	"fenway park":"fenwaypark.jpg" ,
	"u.s. cellular field":"uscellularfield.jpg" ,
	"oakland-alameda county coliseum":"mcafeecoliseum.jpg",
	"marlins park":"marlins.jpg",
	"citi field":"citifield.jpg",
	
	 "target field":"targetfield.jpg"
} // no comma on the last

var homeTurf = {
	"minnesota":"target field",
  "philadelphia":"citizens bank park",
  "milwaukee":"miller park",
  "san francisco":"u.s. cellular field",
  "la angels":"angel stadium of anaheim",
  "tampa bay":"tropicana field",
  "chicago wsox":"u.s. cellular field",
  "oakland":"oakland-alameda county coliseum",
  "kansas city":"kauffman stadium",
  "los angeles":"dodger stadium",
  "san diego":"petco park",
  "boston":"fenway park",
  "seattle":"safeco field",
  "detroit":"comerica park",
  "atlanta":"turner field",
  "baltimore":"oriole park at camden yards",
  "miami":"marlins park",
  "pittsburgh":"pnc park",
  "ny mets":"citi field",
  "st. louis":"busch stadium",
  "houston":"minute maid park",
  "cleveland":"progressive field",
  "cincinnati":"great american ball park",
  "texas":"rangers ballpark in arlington",
  "toronto":"rogers centre",
  "chicago cubs":"wrigley field",
  "arizona":"chase field",
  "colorado":"coors field",
  "ny yankees":"yankee stadium",
  "washington":"nationals park"
}

function startup(){
	$.ajax({
		type: "GET",
		url: xmlPath+"/"+xmlGameID+".xml",
		
		dataType: "xml",
		success: function(data){
			var d = $(data);
			var Play = d.find('Play');
			var Teams = $(data).find("Team");
			
			$.each(Teams,function(i,Team) {
				 
		
				team=$(Team);
					var id = team.attr("ID").toLowerCase();
					
					var homeOrAway = team.attr("vh");
					var name = team.attr("name").toLowerCase();
				
					if (homeOrAway=="H") {
					var stadium_location = stadiums[homeTurf[name]]; // or have
					var url = "http://images.sportsnetwork.com/mlb/attheballpark/stadiums/";
					url = (stadium_location) ?url + stadium_location:"default.gif";
					$("#imgStad").attr("src",url)
					//  $('#imgStad').attr('src', imgStad);
					var loc = Play.attr('Location') ;
					var locate = "Location" + $('#txtBallparkname').html(loc).toUpperCase; 
					 var d = $(data);
                d.find('Team').each(function(i,Team){
                    if ($(Team).attr('vh') == "H") {

                        $('#imghometeam').attr('src', 'http://images.sportsnetwork.com/MLB/attheballpark/pbp_logos/' +$(Team).attr('ID') + ".png");

                    }
                })
                d.find('Team').each(function(i,Team){
                    if ($(Team).attr('vh') == "A") {

                        $('#imgawayteam').attr('src', 'http://images.sportsnetwork.com/MLB/attheballpark/pbp_logos/' +$(Team).attr('ID') + ".png");

                    }
                });
            
				}  		
			});
		}
	});

	$('#P,#C,#FB,#SB,#SS,#TB,#LF,#CF,#RF').hover(function(){
		$('#playerImage').attr('src', 'http://images.sportsnetwork.com/MLB/attheballpark/players/'+intPosID[this.id].id+'.jpg');
		$('#PlayerName').html(intPosID[this.id].name);
		$('#PositionName').html(intPosID[this.id].pos);
	},function() {
		$('#playerImage').attr('src', 'http://sportsnetwork.com/gamecast/mlb/Images/blank.png');
		$('#PlayerName').html('&nbsp;');
		$('#PositionName').html('&nbsp;');
	});

	$('#HPUmpire,#TBUmpire,#SBUmpire,#FBUmpire').hover(function(){
		$('#playerImage').attr('src', 'http://images.sportsnetwork.com/MLB/attheballpark/umpires/'+intPosID[this.id].id+'.jpg');
		$('#PlayerName').html(intPosID[this.id].name);
		$('#PositionName').html(intPosID[this.id].pos);
	},function() {
		$('#playerImage').attr('src', 'http://sportsnetwork.com/gamecast/mlb/Images/blank.png');
		$('#PlayerName').html('&nbsp;');
		$('#PositionName').html('&nbsp;');
	});

//});


function loadAll() {

	$.ajax({
		type: "GET",
		url: xmlPath+"/"+xmlGameID+".xml",
	
		dataType: "xml",
		success: function(data){
			var d = $(data);
if (d.find('Play').attr("Status").toUpperCase() === "FINAL") {
        clearInterval(myVar);
      } 
      if (d.find('Play').attr("NoPlay").toUpperCase() === '1') {
        $('#txtBallparkname').html("Rain Delay");
       
        clearInterval(myVar);
      } 
       if (d.find('Play').attr("NoPlay").toUpperCase() === '0') {
        
       
        setInterval(myVar);
      } 
			for (var posItem in intPosID) {
				posItem.updated = false;
			}
$(d.find('Pitcher[TeamID="' + intPitcherTeamID + '"]')).find('Player').each(function(i, nodePlayer){ // always 1?
    nodePlayer = $(nodePlayer);
    var posItem = intPosID['P'];
    if (posItem) { // && !posItem.updated
        posItem.id = nodePlayer.attr('ID');
        posItem.name = nodePlayer.attr('FirstName') + ' ' + nodePlayer.attr('Lastname');
        posItem.updated = true;
        //tempCount++;
    }
});
			$(d.find('Fielders')).find('Player').each(function(indexPlayer, nodePlayer){
				nodePlayer = $(nodePlayer);
				var posItem = intPosID[nodePlayer.attr('Pos').trim().replace('1B', 'FB').replace('2B', 'SB').replace('3B', 'TB')];
				if (posItem) {
					posItem.id = nodePlayer.attr('ID');
					posItem.name = nodePlayer.attr('FirstName') + ' ' + nodePlayer.attr('Lastname');
					posItem.updated = true;
				} else {
					//console.log('invalid player positem: ' + nodePlayer.attr('Pos'));
				}
			});
			$(d.find('Umpires')).find('*').each(function(indexUmpire, nodeUmpire){
				nodeUmpire = $(nodeUmpire);
				var posItem = intPosID[nodeUmpire.prop('nodeName')];
				if (posItem) {
					posItem.id = nodeUmpire.attr('ID');
					posItem.name = nodeUmpire.text();
					posItem.updated = true;
				} else {
					//console.log('invalid umpire positem: ' + nodeUmpire.prop('nodeName'));
				}
			});

			/*
			var tempCount = 0;
			for (var posItem in intPosID) {
				if (!posItem.updated) {
					tempCount++;
				}
			}
			$('#txtBallparkname').html('temp debug: ' + tempCount + ' items NOT updated');
			*/

			var tempCount = 0;

			var intPitcherTeamID = d.find('Pitcher').attr('TeamID');
			var intBatterTeamID = d.find('Batter').attr('TeamID');
			$('#imgawayteam').attr('src', 'http://images.sportsnetwork.com/MLB/attheballpark/pbp_logos/' +intBatterTeamID + ".png");
			$('#imghometeam').attr('src', 'http://images.sportsnetwork.com/MLB/attheballpark/pbp_logos/' + intPitcherTeamID + ".png");
			// BattersSameTeamAsPitcher
			$(d.find('Batters[TeamID="' + intPitcherTeamID + '"]')).find('Player').each(function(i, nodePlayer){
				nodePlayer = $(nodePlayer);
				var posPlayer = nodePlayer.attr('Pos').replace('1B', 'FB').replace('2B', 'SB').replace('3B', 'TB');
				var posItem = intPosID[posPlayer];
				if (posItem) { // && !posItem.updated
					posItem.id = nodePlayer.attr('ID');
					posItem.name = nodePlayer.attr('FirstName') + ' ' + nodePlayer.attr('Lastname');
					posItem.updated = true;
					tempCount++;
				}
			});
			//$('#txtBallparkname').html('temp debug: ' + tempCount + ' items extra updated!');


			var Fielder = $(d.find('Fielders').find('Player:first'));
			var Team = $(d.find("Team[ID='" + Fielder.attr('TeamID') + "']"));
			var unfrm = Team.attr('Uniform'); // +'.gif';
			$('#P,#C,#FB,#SB,#SS,#TB,#LF,#CF,#RF').attr('src', 'http://images.sportsnetwork.com/MLB/attheballpark/pbp_logos/'+unfrm);
			//srcFieldTeamLogo = 'http://images.sportsnetwork.com/MLB/attheballpark/pbp_logos/'+Team.attr('ID')+'.png';
			//var d = $(data);
			//var Pitchers = $(d.find('Batters').find('Player:first'));
			///var Team = $(d.find("Team[ID='" + Batter.attr('TeamID') + "']"));
			//var unfrm = Team.attr('Uniform'); 
			//var bat = Batter.attr("Bats");
			
			//if (srcFieldTeamLogo != "") $('#srcFieldTeamLogo').attr('src', srcFieldTeamLogo);

		}
	})
}

Open in new window

Please Help
powerztomAsked:
Who is Participating?
 
GaryConnect With a Mentor Commented:
function startup() is not being closed.
0
 
Julian HansenConnect With a Mentor Commented:
Add '}' to line 237
0
 
powerztomAuthor Commented:
Thanks julianH. Provided correct input to fix my syntax problem.Awesome
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
GaryCommented:
Isn't that what I said half an hour ago.
0
 
Julian HansenCommented:
Gary is right - I saw his post and just filled in the missing bit - the line number.
0
 
powerztomAuthor Commented:
Both guys provided same solution didn't see gary though.sorry
0
 
Julian HansenCommented:
Thanks powerztom,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.