Unexpected error

Hi guys im having this problem now but i what does this mean?I seriously have no idea why this is happening.Please help.Thanks.

Sending RPC failed because ‘Client_PlayerJoined’ parameter 1 didn’t match the RPC declaration. Expected ‘UnityEngine.NetworkPlayer’ but got ‘System.Int32’
UnityEngine.NetworkView:RPC(String, RPCMode, Object)
NetworkManager:Server_PlayerJoined(String, Int32, NetworkPlayer) (at Assets/Scripts/Network/NetworkManager.cs:83)
NetworkManager:OnServerInitialized() (at Assets/Scripts/Network/NetworkManager.cs:59)
UnityEngine.Network:InitializeServer(Int32, Int32, Boolean)
NetworkManager:StartServer(String, Int32) (at Assets/Scripts/Network/NetworkManager.cs:42)
Menu:Host() (at Assets/Scripts/Level/Menu.cs:63)
Menu:OnGUI() (at Assets/Scripts/Level/Menu.cs:36)

Here’s my script

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class NetworkManager : MonoBehaviour
{
	public string PlayerName;
	public string MatchName;
	public static NetworkManager Instance;
	public List<Player>PlayerList = new List<Player>();
	public Player MyPlayer;
	public GameObject SpawnPlayer;
	public bool MatchStarted;
	public Level CurLevel;
	public List<Level> ListOfLevels = new List<Level>();
	//public List<Transform> SpawnPoints = new List<Transform>();
	public GameObject[] SpawnPoints;
	//public bool MatchLoaded;
	
	// Use this for initialization
	void Awake()
	{
		Instance = this;
		PlayerName = PlayerPrefs.GetString("name");
		//PlayerName = PlayerPrefs.SetString("name");
		//MasterServer.ipAddress = "127.0.0.1";
		//MasterServer.port = 23466;
		//Network.natFacilitatorIP = "127.0.0.1";
	}
	void Start () {
		DontDestroyOnLoad(gameObject);
	}
	
	// Update is called once per frame
	void Update () {
		
	}
	
	public void StartServer(string ServerName, int MaxPlayers)
	{
		Network.InitializeSecurity();
		Network.InitializeServer (MaxPlayers, 25565, true);
		MasterServer.RegisterHost("Tut", ServerName, "");
		
		Debug.Log("Started Server");
	}
	void OnPlayerConnected(NetworkPlayer id)
	{
		//if (Network.peerType == NetworkPeerType.Server)
		//networkView.RPC ("Server_PlayerJoined", RPCMode.Server, PlayerName, id);
		foreach (Player pl in PlayerList)
		{
			networkView.RPC("GetLevel",id,CurLevel.LoadName,MatchStarted);
			networkView.RPC("Client_PlayerJoined",id,pl.PlayerName, pl.OnlinePlayer,pl.Rank);
		}
	}
	void OnServerInitialized()
	{
		Server_PlayerJoined(PlayerName,RankManager.Inst.CurLevel,Network.player);
	}
	
	void OnConnectedToServer()
	{
		networkView.RPC ("Server_PlayerJoined", RPCMode.Server, PlayerName,RankManager.Inst.CurLevel, Network.player);
	}

	void OnPlayerDisconnected(NetworkPlayer id)
	{
		networkView.RPC ("RemovePlayer", RPCMode.All, id);
		Network.Destroy (GetPlayer (id).Manager.gameObject);
		Network.RemoveRPCs(id);
	}

	void OnDisconnectedFromServer(NetworkDisconnection info)
	{
		PlayerList.Clear ();
		Application.LoadLevel (1);
	}

	[RPC]
	public void Server_PlayerJoined(string Username,int Rank,NetworkPlayer id)
	{
		networkView.RPC("Client_PlayerJoined", RPCMode.All,Username,Rank,id);
	}
	
	[RPC]
	public void Client_PlayerJoined(string Username,NetworkPlayer id,int Rank)
	{
		Player temp = new Player();
		temp.PlayerName = Username;
		temp.OnlinePlayer = id;
		temp.Rank = Rank;



		PlayerList.Add(temp);
		if (Network.player == id)
		{
			MyPlayer = temp;
			GameObject LastPlayer = Network.Instantiate(SpawnPlayer,Vector3.zero,Quaternion.identity,0) as GameObject;

		}
	}

	[RPC]
	public void RemovePlayer(NetworkPlayer id)
	{
		Player temp = new Player ();
		foreach(Player pl in PlayerList)
		{
			if(pl.OnlinePlayer == id)
			{
				temp = pl;
			}
		}
		if(temp != null)
		{
			PlayerList.Remove (temp);
		}
	}
	[RPC]
	public void LoadLevel(string LoadName)
	{
		Application.LoadLevel (LoadName);
		MatchStarted = true;
	}

	[RPC]
	public Level GetLevel(string LoadName,bool IsStarted)
	{
		if (IsStarted)
			LoadLevel (LoadName);
		foreach (Level lvl in ListOfLevels) 
		{
			if(LoadName == lvl.LoadName)
			{
				CurLevel = lvl;
				return lvl;
			}
		}
		return null;
	}

	/*void OnLevelWasLoaded(int level)
	{
		if (MatchStarted == true)
		//SpawnPoints = LevelManager.Ins.SpawnPoints;
	}
	*/

	public static Player GetPlayer(NetworkPlayer id){
		foreach (Player pl in Instance.PlayerList) 
		{
			if(pl.OnlinePlayer == id)
				return pl;
		}
		return null;

	}
	public static Player GetPlayer(string id){
		foreach (Player pl in Instance.PlayerList) 
		{
			if(pl.PlayerName == id)
				return pl;
		}
		return null;
		
	}

	void OnGUI()
	{
		if  (MatchStarted == true && !MyPlayer.IsAlive)
			{
			if(GUI.Button(new Rect(Screen.width - 50,0,50,20),"Spawn"))
			{
				MyPlayer.Manager.FirstpersonCont.Spawn ();
				int SpawnIndex = Random.Range(0, LevelManager.Ins.SpawnPoints.Length - 1);
				MyPlayer.Manager.FirstPerson.localPosition = LevelManager.Ins.SpawnPoints[SpawnIndex].transform.position;
				MyPlayer.Manager.FirstPerson.localRotation = LevelManager.Ins.SpawnPoints[SpawnIndex].transform.rotation;
				MyPlayer.Manager.networkView.RPC("Spawn",RPCMode.All);
			}
		}
		if (MatchStarted) 
		{
			if(GUILayout.Button ("Suicide"))
			{
				MyPlayer.Manager.Die();
			}
		}
	}
	
	[System.Serializable]
	public class Player{
	public string PlayerName;
	public NetworkPlayer OnlinePlayer;
	public float Health = 100;
	public Character Manager;
	public bool IsAlive;
		public int Deaths;
		public int Kills;
		public int Score;
		public int Rank;

	}
[System.Serializable]
	public class Level
	{
		public string LoadName;
		public string PlayName;
	}
}

The problem is here:

 [RPC]
    public void Server_PlayerJoined(string Username,int Rank,NetworkPlayer id)
    {
        networkView.RPC("Client_PlayerJoined", RPCMode.All,Username,Rank,id);
    }

You are sending parameters string, int, NetworkPlayer to the RPC method, but it expects string, NetworkPlayer, int. Switch the order of your last 2 parameters in the call, like:

networkView.RPC("Client_PlayerJoined", RPCMode.All,Username,id,Rank);

It’s pretty clear from the error if you read it carefuly.

Sorry posting as answer dont fit in comment.Here’s my script but still cant work.

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class NetworkManager : MonoBehaviour
{
	public string PlayerName;
	public string MatchName;
	public static NetworkManager Instance;
	public List<Player>PlayerList = new List<Player>();
	public Player MyPlayer;
	public GameObject SpawnPlayer;
	public bool MatchStarted;
	public Level CurLevel;
	public List<Level> ListOfLevels = new List<Level>();
	//public List<Transform> SpawnPoints = new List<Transform>();
	public GameObject[] SpawnPoints;
	//public bool MatchLoaded;
	
	// Use this for initialization
	void Awake()
	{
		Instance = this;
		PlayerName = PlayerPrefs.GetString("name");
		//PlayerName = PlayerPrefs.SetString("name");
		//MasterServer.ipAddress = "127.0.0.1";
		//MasterServer.port = 23466;
		//Network.natFacilitatorIP = "127.0.0.1";
	}
	void Start () {
		DontDestroyOnLoad(gameObject);
	}
	
	// Update is called once per frame
	void Update () {
		
	}
	
	public void StartServer(string ServerName, int MaxPlayers)
	{
		Network.InitializeSecurity();
		Network.InitializeServer (MaxPlayers, 25565, true);
		MasterServer.RegisterHost("Tut", ServerName, "");
		
		Debug.Log("Started Server");
	}
	void OnPlayerConnected(NetworkPlayer id)
	{
		//if (Network.peerType == NetworkPeerType.Server)
		//networkView.RPC ("Server_PlayerJoined", RPCMode.Server, PlayerName, id);
		foreach (Player pl in PlayerList)
		{
			networkView.RPC("GetLevel",id,CurLevel.LoadName,MatchStarted);
			networkView.RPC("Client_PlayerJoined",id,pl.PlayerName, pl.OnlinePlayer,pl.Rank);
		}
	}
	void OnServerInitialized()
	{
		Server_PlayerJoined(PlayerName,RankManager.Inst.CurLevel,Network.player);
	}
	
	void OnConnectedToServer()
	{
		networkView.RPC ("Server_PlayerJoined", RPCMode.Server, PlayerName,RankManager.Inst.CurLevel, Network.player);
	}

	void OnPlayerDisconnected(NetworkPlayer id)
	{
		networkView.RPC ("RemovePlayer", RPCMode.All, id);
		Network.Destroy (GetPlayer (id).Manager.gameObject);
		Network.RemoveRPCs(id);
	}

	void OnDisconnectedFromServer(NetworkDisconnection info)
	{
		PlayerList.Clear ();
		Application.LoadLevel (1);
	}

	[RPC]
	public void Server_PlayerJoined(string Username,int Rank,NetworkPlayer id)
	{
		networkView.RPC("Client_PlayerJoined", RPCMode.All,Username,id,Rank);
	}

	[RPC]
	public void Client_PlayerJoined(string Username,int Rank,NetworkPlayer id)
	{
		Player temp = new Player();
		temp.PlayerName = Username;
		temp.OnlinePlayer = id;
		temp.Rank = Rank;
		PlayerList.Add(temp);
		if (Network.player == id)
		{
			MyPlayer = temp;
			GameObject LastPlayer = Network.Instantiate(SpawnPlayer,Vector3.zero,Quaternion.identity,0) as GameObject;
			temp.Manager = LastPlayer.GetComponent<Character>();

		}
	}

	[RPC]
	public void RemovePlayer(NetworkPlayer id)
	{
		Player temp = new Player ();
		foreach(Player pl in PlayerList)
		{
			if(pl.OnlinePlayer == id)
			{
				temp = pl;
			}
		}
		if(temp != null)
		{
			PlayerList.Remove (temp);
		}
	}
	[RPC]
	public void LoadLevel(string LoadName)
	{
		Application.LoadLevel (LoadName);
		MatchStarted = true;
	}

	[RPC]
	public Level GetLevel(string LoadName,bool IsStarted)
	{
		if (IsStarted)
			LoadLevel (LoadName);
		foreach (Level lvl in ListOfLevels) 
		{
			if(LoadName == lvl.LoadName)
			{
				CurLevel = lvl;
				return lvl;
			}
		}
		return null;
	}

	/*void OnLevelWasLoaded(int level)
	{
		if (MatchStarted == true)
		//SpawnPoints = LevelManager.Ins.SpawnPoints;
	}
	*/

	public static Player GetPlayer(NetworkPlayer id){
		foreach (Player pl in Instance.PlayerList) 
		{
			if(pl.OnlinePlayer == id)
				return pl;
		}
		return null;

	}
	public static Player GetPlayer(string id){
		foreach (Player pl in Instance.PlayerList) 
		{
			if(pl.PlayerName == id)
				return pl;
		}
		return null;
		
	}

	void OnGUI()
	{
		if  (MatchStarted == true && !MyPlayer.IsAlive)
			{
			if(GUI.Button(new Rect(Screen.width - 50,0,50,20),"Spawn"))
			{
				MyPlayer.Manager.FirstpersonCont.Spawn ();
				int SpawnIndex = Random.Range(0, LevelManager.Ins.SpawnPoints.Length - 1);
				MyPlayer.Manager.FirstPerson.localPosition = LevelManager.Ins.SpawnPoints[SpawnIndex].transform.position;
				MyPlayer.Manager.FirstPerson.localRotation = LevelManager.Ins.SpawnPoints[SpawnIndex].transform.rotation;
				MyPlayer.Manager.networkView.RPC("Spawn",RPCMode.All);
			}
		}
		if (MatchStarted) 
		{
			if(GUILayout.Button ("Suicide"))
			{
				MyPlayer.Manager.Die();
			}
		}
	}
	
	[System.Serializable]
	public class Player{
	public string PlayerName;
	public NetworkPlayer OnlinePlayer;
	public float Health = 100;
	public Character Manager;
	public bool IsAlive;
		public int Deaths;
		public int Kills;
		public int Score;
		public int Rank;

	}
[System.Serializable]
	public class Level
	{
		public string LoadName;
		public string PlayName;
	}
}