Forum C# New but just a simple question

New but just a simple question

Postby redfawx » April 21st, 2013, 6:20 am

Wasnt sure if anyone could help since its a bit late here. I am working on creating a ping monitor for my game. The problem is that the server is sending everyone's times to everyone. The code is below. All I am trying to do is send the message type "Ping" back to just the player that send it originally to the server. I thought that player.send() was that.

Code: Select all
public override void GotMessage(Player player, Message message) {
            Console.WriteLine(message);

            //way 2
            switch (message.Type)
            {
               
                case "Ping":
                    player.Send("Ping");
                    break;
               



            }

      }
redfawx
 
Posts: 2
Joined: September 3rd, 2012, 9:35 am

Re: New but just a simple question

Postby nobodyHere » April 21st, 2013, 9:07 pm

The code you posted works perfectly.
Could you describe the problem in more detail?
nobodyHere
 
Posts: 20
Joined: April 30th, 2012, 8:52 pm

Re: New but just a simple question

Postby redfawx » April 21st, 2013, 9:17 pm

This problem is now fixed. I noticed that it was an error in the client side. Thank you for your time whomever looked at this.
redfawx
 
Posts: 2
Joined: September 3rd, 2012, 9:35 am


Return to C#



cron