Spawnproblem in the fps Tutorial

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
Zerano
Posts: 10
Joined: 16 Jun 2011, 10:18

Spawnproblem in the fps Tutorial

Post by Zerano »

I do not know whats wrong sometimes all is okay, i can login and walk around. But sometimes i get this Error and i do not know where the problem is. Maybe you can help me with a tip where i have to look.

Image[/img]
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Post by ThomasLund »

Could possibly be a client that tries to reconnect from a disconnection (where the server still has the connection open - it stays open for a little while).

If you e.g. press stop in the editor and very fast afterwards press play again - the system might try to re-use a connection - and the extension doesnt handle that situation.

Best guess

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Zerano
Posts: 10
Joined: 16 Jun 2011, 10:18

Post by Zerano »

I found the mistake. it was so stupid :D
I changed the spawnpoint in the sfs fps demo but forgot to change the amount in the array :D

Code: Select all

private static Transform[] getSpawnPoints() {
		Transform[] spawnPoints = new Transform[3]; //<---- wrong
		spawnPoints[0] = new Transform(642, 165, 1700, 0, 0, 0);
		return spawnPoints;
	}

Code: Select all


private static Transform[] getSpawnPoints() {
		Transform[] spawnPoints = new Transform[1];
		spawnPoints[0] = new Transform(642, 165, 1700, 0, 0, 0);
		return spawnPoints;
	}
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Post by ThomasLund »

Ahhh :-)
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Post Reply