- Home /
really weird error - parameter must be of type:
What could cause this error?
Script error: OnPlayerDisconnected
This message parameter has to be of type:
The message will be ignored.
I'm using prime31's GameCenter plugin - and trying to register with the playerDisconnected event, using this function:
GameCenterMultiplayerManager.playerDisconnected += OnPlayerDisconnected;
public void OnPlayerDisconnected (string playerID) {
// test here
networkPlayerConnected = false;
iTween.MoveTo(rematchButton, new Vector3(49.16f, -29.29f, -36.63f), 1);
}
Hi,guys. I'm using Prime31's Game Center plugin and have the same problem like you.I don't know what wrong with it.Did you fix it?
Answer by QI · Oct 13, 2013 at 01:49 AM
HI,guys. The one thing you should know is Unity3d will call OnPlayerDisconnected,OnPlayerConnected function at UnityEngine.Network. This meaning rename your function will fix this problem. You can rename it like OnUserDisconnected. Its can give you help.
Answer by roamcel · Aug 30, 2011 at 01:23 PM
That doesn't look like a correct function call. For a start, OnPlayerDisconnected returns void, and you're instead summing its "result" to playerDisconnected. Additionally, you're making the call without the 'playerID' parameter. Lastly, given the code, you probably just need to call
OnPlayerDisconnected(yourplayervariablehere);
rather than assign its results somewhere;
Your answer
Follow this Question
Related Questions
Toon shader error 1 Answer
Really need help for my code! 2 Answers
Some Copies of Prefab Detect Clicks But Others Don't 1 Answer
Texture2D as a png file. 0 Answers