rem: var success = client.beginConnect (ipAddress); if (!success) { messageBox(400, 200, "Failed to connect to server. Please check the network connection.", "Client Failure", 2, new Array(), new Array()); return 1; } else { console.write ("Client successfully started to connect to " + ipAddress + "."); }  
context: function initMPClient (mpParentWindow, ipAddress, profileName){	// Create the client instance	var client = createClient();	// Player Name	client.playerName = profileName;	var success = client.beginConnect (ipAddress);	if (!success)	{		messageBox(400, 200, "Failed to connect to server. Please check the network connection.",			"Client Failure", 2, new Array(), new Array());		return 1;	}	else	{		console.write ("Client successfully started to connect to " + ipAddress + ".");	}	client.onClientConnect = function (event)	{		// Set player slot to new player's name.		pushItem ("pgSessionSetupP" + (event.id), event.name);	}	client.onConnectComplete = function (event)	{		if (event.success)		{			// Switch to Session Setup screen.			sessionType = "Client";			openSessionSetup ("pgMPJoin");			messageBox (400, 200, "Client connected " + event.message + ".",				"Connect Complete", 2, new Array(), new Array());		}		else		{			messageBox (400, 200, "Client failed to complete connection: " + event.message + ".",				"Connect Failure", 2, new Array(), new Array());		}	}	client.onChat = function (event)	{		messageBox (400, 200, "(" + event.sender + ")" + event.message,			"Client Chat Message", 2, new Array(), new Array());	}	client.onDisconnect = function (event)	{		messageBox (400, 200, event.message,			"Host Disconnected", 2, new Array(), new Array());	}	client.onClientDisconnect = function (event)	{		messageBox (400, 200, event.session,			"Client " + event.name + "(" + event.id + ") Disconnected", 2, new Array(), new Array());	}	client.onConnect = function (event)	{		messageBox (400, 200, event.session,			"Client " + event.name + "(" + event.id + ") Connected", 2, new Array(), new Array());	}	client.onStartGame = function (event)	{		// The server has called Start Game!, so we better switch to the session GUI and stuff like that.		startMap (			getCurrItemValue ("pgSessionSetupMapName"), 			getGUIObjectByName("pgSessionSetupLosSetting").selected, 			"pgSessionSetup");	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1070/b17df7db8cb5dfd89e982c72f156c1b0d3e0e940/functions_page_pregame_multiplayer.js/clean/binaries/data/mods/official/gui/test/functions_page_pregame_multiplayer.js