Hey all I'm just learning all the lidgren stuff and I'm trying to send a message to a server when someone clicks a button with the following code
[code]
NetOutgoingMessage sendMsg = netClient.CreateMessage();
sendMsg.Write("hello server");
netClient.SendMessage(sendMsg, NetDeliveryMethod.ReliableOrdered);
[/code]
when the server decyphers the message it reads out as this in the console
" Rem 1818588271"
this is the server side code on receiving the message:
[code]
NetIncomingMessage msg;
while ((msg = server.ReadMessage()) != null) {
switch (msg.MessageType) {
case NetIncomingMessageType.Data:
string str = msg.ReadString();
int a = msg.ReadInt32();
Debug.WriteLine(str + " " + a);
break;
default:
Debug.WriteLine("Unhandled type: " + msg.MessageType);
break;
}
server.Recycle(msg);
}
[/code]