my problem
- Code: Select all
player.Send(Message message);
This is the basic idea of the code:
- Code: Select all
// inside a switch statment ...
pPlayer.Send("A");
loadDefaultStats(PlayerStats, pPlayer);
pPlayer.Send("B");
SetPlayerClass(PlayerStats, pPlayer);
pPlayer.Send("C");
pPlayer.Send("ProfileLoaded");
My goal here is to send a message to the client after the profile has been loaded or created. Message A and B will send, along with a send statement inside loadDefaultStats(); Hoever, after I call the SetPlayerClass(); which sets the variables for player base class, the player.send() no longer works. Here is the SetPlayerClass();
- Code: Select all
public void SetPlayerClass(DatabaseObject playerStats, Player player)
{
// ... Here is a lot of code that sets the player base class variables.
player.Send("D"); // <---- This will not send either!
}
I am completely lost on ideas. I have tried so many things, from changing the way SetPlayerClass() takes in its arguments to recording the entire function. If someone could explain to me what is going on that would be awesome. Thanks! I love learning so do not be hesitant to linking me to some good articles or guides on why I am having this problem. The main reason I did not just half-ass a quick fix is because I wanted to trial and error until I figured out why C# acts this way, but I have hit my wall...