Obsolete functions?

So, I’m making a multiplayer game. I use am using

	// Checking if you are connected to the server or not
	if (Network.peerType == NetworkPeerType.Disconnected)
		{
			// If not connected
   
			if (GUI.Button (new Rect(10,10,100,30),"Connect"))
			{
				Network.useNat = useNAT;
				// Connecting to the server
				Network.Connect(remoteIP, remotePort);
			}
			if (GUI.Button (new Rect(10,50,100,30),"Start Server"))
			{
				Network.useNat = useNAT;
				// Creating server
				Network.InitializeServer(32, listenPort);
				// Notify our objects that the level and the network is ready
				for (var go : GameObject in FindObjectsOfType(GameObject))
				{
					go.SendMessage("OnNetworkLoadedLevel", 
					SendMessageOptions.DontRequireReceiver); 
				}
			}

However, this makes three errors come up.

Assets/multiplayer/connectionGUI.js(16,41): BCW0012: WARNING: ‘UnityEngine.Network.useNat’ is obsolete. No longer needed. This is now explicitly set in the InitializeServer function call. It is implicitly set when calling Connect depending on if an IP/port combination is used (useNat=false) or a GUID is used(useNat=true).

Assets/multiplayer/connectionGUI.js(22,41): BCW0012: WARNING: ‘UnityEngine.Network.useNat’ is obsolete. No longer needed. This is now explicitly set in the InitializeServer function call. It is implicitly set when calling Connect depending on if an IP/port combination is used (useNat=false) or a GUID is used(useNat=true).

Assets/multiplayer/connectionGUI.js(24,41): BCW0012: WARNING: ‘UnityEngine.Network.InitializeServer(int, int)’ is obsolete. Use the IntializeServer(connections, listenPort, useNat) function instead

I have no idea what these mean. Any help?

Unity did some work on the networking code. It was with unity 3.0 I believe. Anyway like the errors say useNat is no longer needed. Or rather it does not work the way you have it anymore. Here is a link to the new InitializeServer function;

http://unity3d.com/support/documentation/ScriptReference/Network.InitializeServer.html

What do I replace?

Ok, I got that now. But now my player spawning code doesn’t work.

var Player : Transform;
var camera1 : Camera;
function OnNetworkLoadedLevel () 
{
	camera1.enabled = false;
	// Instantiating Player when Network is loaded
	Network.Instantiate (Player, Vector3 (Random.Range (5, 995), 500, Random.Range (5, 995)), transform.rotation, 0);
}

function OnPlayerDisconnected (player : NetworkPlayer) 
{
	Network.RemoveRPCs(player, 0);
	Network.DestroyPlayerObjects(player);
	camera1.enabled = true;
}