NullReferenceException when send packet using UDP

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

Moderators: Lapo, Bax

kevinjee
Posts: 1
Joined: 22 Sep 2011, 08:33

NullReferenceException when send packet using UDP

Postby kevinjee » 23 Sep 2011, 08:22

I called InitUDP after join room successfully. But when I call SmartFox.send using true as its last parameter, it failed.

error as below:

NullReferenceException: Object reference not set to an instance of an object
Sfs2X.Bitswarm.BitSwarmClient.NextUdpPacketId ()

I figure out what's going on. I used InitUDP() method instead of InitUDP(serverName, serverPort), which cause that error.
sorry guys.
Last edited by kevinjee on 28 Sep 2011, 04:44, edited 1 time in total.
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 23 Sep 2011, 09:30

Try init the upd connection upon login.

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 6 guests